Skip to content
Discussion options

You must be logged in to vote

You can do that sometimes. You just need to adhere to the ARIA spec for the component. Usually extra wrappers are ok if they have role="presentation" so that they don't affect the accessibility tree, and are generic elements like div/span and not something interactive. This is a little fuzzy so I would recommend running an accessibility checker like aXe to check.

What we mean by "Always render the expected element type" is that the dom props passed into render need to be attached to the expected element type. In your example, inputProps needs to be attached to an <input> element.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dmitrc
Comment options

Answer selected by dmitrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants