Volto - schema.Textline field - mode display not working

I had in my 'model.Schema for a custom content type some TextLine fields which are used to display information e.g. about allowed file extensions for an upload.

``Python

directives.mode(filetitlefield='display')
filetitlefield = schema.TextLine(
    title=_(safe_unicode('The first file you want to upload')),
    description=_(safe_unicode(
        'You need only to upload one file to your project. There are '
        'options for further two file uploads if you want to provide '
        'files for different platforms.')),
    required=False,
)

``

This works fine in classic UI. The field is not editable. If I call it in Volto UI there is an extra empty field, that is editable (and asks for some input). The title and the description are displayed too.

``Python

directives.mode(tfileextension='display')
tfileextension = schema.TextLine(
    title=_(safe_unicode(
        'The following file extensions are allowed for template '
        'files (upper case and lower case and mix of both):')),
    defaultFactory=allowedtemplatefileextensions,
)

``

This works in Plone classic UI. But if I call the content type's edit form the field with the vocabulary is editable.

Is this an issue within Volto or is there some extra customization in the Volto frontend necessary?

It's a bug (or rather, a missing feature), I think. It should be fixed in Volto. The minimum would be to pass the readOnly flag to to the fields, so it should be easy to fix.

I tried with Plone 6.0.0a4 and Volto 15.4.1 again. The issue is already there. The field with the directive.mode display is editable (in the edit mode of the content type).