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

Add aria-describedby to merge/rebase/squash button #17448

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

sergiou87
Copy link
Member

@sergiou87 sergiou87 commented Sep 26, 2023

xref. https://github.com/github/accessibility-audits/issues/5576

Description

This PR adds an aria-describedby attribute to the rebase/merge/squash button, referencing the element describing the outcome of the operation that we render right above the button itself. After some testing, I noticed VoiceOver would only read this when using Electron 26 but not with Electron 24 🤯

It also fixes a bug in the tooltips that weren't respecting existing aria-describedby attributes in the target element. Kudos to @tidy-dev for finding out this bug!! 🙇‍♂️

Screenshots

CleanShot.2023-09-27.at.08.57.56.mp4

Release notes

Notes: [Improved] When focusing the rebase/merge/squash button, screen readers announce the outcome of the operation

Before this change, the tooltip would override (setting or removing) whatever the target element had set as `aria-describedby`.

This was evident when trying to set a custom `aria-describedby` to an element with a tooltip: the `aria-describedby` attribute wouldn't make it to the DOM 😑

With this change, the tooltip will add or remove itself, respecting whatever was in there before.
@sergiou87 sergiou87 marked this pull request as ready for review September 27, 2023 10:02
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Works great!

Great fix for the disappearing aria-describedby due to removal/addition for tooltips!

@sergiou87 sergiou87 merged commit 0984198 into development Sep 29, 2023
7 checks passed
@sergiou87 sergiou87 deleted the describedby-for-merge-button branch September 29, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants