We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, we add a default id to our form components like textarea,input, etc. OnMount we update the id and which is connected with the <label>.
id
textarea
input
OnMount
<label>
The accessibility tree isn't updating when this id changes. Therefore the label gets duplicated for screen-reader users:
A solution could be to move the form-component into the <label> or work with aria-hidden ?
aria-hidden
The text was updated successfully, but these errors were encountered:
I don't see a use case for an id that would change after initially mounted. Is this mainly meant for resilience ?
Sorry, something went wrong.
Our implementation looks like this:
onMount(() => { state._id = props.id || 'input-' + uuid(); state._dataListId = props.dataListId || `datalist-${uuid()}`; }); onUpdate(() => { if (state._id) { state._messageId = state._id + DEFAULT_MESSAGE_ID_SUFFIX; state._validMessageId = state._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX; state._invalidMessageId = state._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX; } }, [state._id]);
We need to connect all messages for aria-describedby
aria-describedby
Successfully merging a pull request may close this issue.
Currently, we add a default
id
to our form components liketextarea
,input
, etc.OnMount
we update the id and which is connected with the<label>
.The accessibility tree isn't updating when this id changes. Therefore the label gets duplicated for screen-reader users:
![image](https://private-user-images.githubusercontent.com/104347736/325930323-2fd84676-ebbb-4ff8-a5e8-a93177ff3b6b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NjYzMjksIm5iZiI6MTcxODk2NjAyOSwicGF0aCI6Ii8xMDQzNDc3MzYvMzI1OTMwMzIzLTJmZDg0Njc2LWViYmItNGZmOC1hNWU4LWE5MzE3N2ZmM2I2Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyMVQxMDMzNDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMWI4NzZlZDk5MjI4YWY1ZDljMWZhODQ5NGE1MGUxNmFkYmNjODE4ZGU3YWQ0Njc1MmIzMjVjNmNmNjU1MWNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.nqUUAkaVSPkwJ9X8cN-dUCS9san7kdOk1ri-4qDNROo)
A solution could be to move the form-component into the
<label>
or work witharia-hidden
?The text was updated successfully, but these errors were encountered: