Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently the
readonly
ofuui-select
just render as label, which I don't think is the right approach although browser only supportreadonly
on native input and not select.I found a few similar examples here:
https://storybook.rsuitejs.com/?path=/story/components-checkpicker--readonly
https://carbon.sage.com/?path=/story/select--readonly
However there's an
aria-readonly
attribute we can use instead.https://helloanselm.com/writings/til-css-readonly-is-not-for-select-fields
The CSS props for select didn't quite seem to align with the ones on input. It may be a breaking change. Perhaps we can deprecate the existing one somehow.
It seems the name convension is:
--uui-[element]-[css-property]-[state]
Generally speaking I think think
readonly
state should still render the editor, not disable it (meaning it can still be focused and text selected, but not change input/editor value).If not already possible, we have in past (Umbraco 13) done the following with
SendingContentNotification
to setReadonly
, but always swap the editor to e.g. Label property editor.umbraco/Umbraco-CMS#16329
Types of changes
Motivation and context
How to test?
Screenshots (if appropriate)
Checklist