Skip to content
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

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

Chisomchima
Copy link
Member

@Chisomchima Chisomchima commented Feb 12, 2024

feat: update accessibility in button component


Description

Implemented JIRA_ISSUE_ID by updating the Button component to handle title and aria-label attributes passed as part of otherProps. This change ensures that accessibility attributes can be easily included when using the Button component.


Known issues

  • None

Checklist

  • API docs are generated
  • Tests were added
  • Storybook demos were added

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

  • None

Additional Notes

  • Updated the Button component to destructure title and ariaLabel from otherProps and apply them to the <button> element.
  • Ensured that title and aria-label attributes are correctly passed to the rendered <button> element.
  • Modified the component to handle additional attributes passed as otherProps while maintaining accessibility.

supporting text

@Chisomchima Chisomchima requested a review from a team as a code owner February 12, 2024 15:21
@dhis2-bot
Copy link
Contributor

🚀 Deployed on https://pr-1451--dhis2-ui.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify February 12, 2024 15:25 Inactive
@Chisomchima Chisomchima changed the title Libs 565/button accessibility feat: update accessibility in button component Feb 12, 2024
@Chisomchima Chisomchima marked this pull request as draft February 12, 2024 16:07
@Chisomchima Chisomchima marked this pull request as ready for review February 12, 2024 16:13
@kabaros kabaros requested a review from cooper-joe February 12, 2024 16:58
Copy link

cypress bot commented Feb 12, 2024

Passing run #3218 ↗︎

0 584 0 0 Flakiness 0

Details:

feat: update accessibility in button component
Project: ui Commit: 0a015c7fe9
Status: Passed Duration: 21:44 💡
Started: Feb 12, 2024 5:06 PM Ended: Feb 12, 2024 5:27 PM

Review all test suite changes for PR #1451 ↗︎

Copy link
Member

@cooper-joe cooper-joe left a 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.

@Chisomchima Chisomchima merged commit ffc086f into master Feb 13, 2024
23 of 33 checks passed
@Chisomchima Chisomchima deleted the LIBS-565/button-accessibility branch February 13, 2024 13:32
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 9.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants