-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
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
feat: update accessibility in button component #1451
Conversation
🚀 Deployed on https://pr-1451--dhis2-ui.netlify.app |
Passing run #3218 ↗︎
Details:
Review all test suite changes for PR #1451 ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
As an aside, as mentioned on the ticket, I think it would be nice to introduce some soft warning or linting if there is no button label and there is no aria-label. However, we may want to address this as a library wide linting strategy, so deferring for now.
feat: update accessibility in button component
Description
Implemented JIRA_ISSUE_ID by updating the Button component to handle
title
andaria-label
attributes passed as part ofotherProps
. This change ensures that accessibility attributes can be easily included when using the Button component.Known issues
Checklist
All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done.
Screenshots
Additional Notes
Button
component to destructuretitle
andariaLabel
fromotherProps
and apply them to the<button>
element.title
andaria-label
attributes are correctly passed to the rendered<button>
element.otherProps
while maintaining accessibility.supporting text