use existing role implementation rather than rolling our own #273
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.
This change is potentially breaking - but since we're still in beta that's probably ok and would recommend doing a minor version bump.
But also - feel free to close this issue if it's not a desired change
I like that it's consistent (you will always get a role on the outer component)
but i see the advantages of the current approach
we were missing role property on text input and menu button (https://anvil.works/forum/t/m3-legacy-read-only-role-not-working-with-m3-dependency/23911/5)
this PR implements the role prop in the same way we implement the visible prop
i.e. bypass our form template custom component descriptor and instead use the HtmlTemplate's role descriptor.
This will change where the
.anvil-role-Xclass is applied, and so users may find their current role code breaks, and will need to change code fromto something like
This might not be the approach we actually want to take
so feel free to close this, and instead we can just add the missing role properties to
TextInputandMenuItemclose #279