-
Notifications
You must be signed in to change notification settings - Fork 26
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
STCOR-753: Add aria-label for ProfileDropdown.js
#1382
Conversation
…t in element's accessible name
BigTest Unit Test Statistics 1 files ±0 1 suites ±0 10s ⏱️ ±0s Results for commit 3e5bcca. ± Comparison against base commit 01c5d6c. This pull request removes 5 and adds 3 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
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.
As @Dmitriy-Litvinenko noted, the new aria-label
must be handle via react-intl so it can be localized.
Done! |
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.
Close, but not quite right. formatMessage()
requires two arguments.
ProfileDropdown.js
ProfileDropdown.js
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.
Sorry, still not quite right, and sorry I didn't catch this sooner: closely reviewing @JohnC-80's request on STCOR-753, this PR must "expand the accessible label" of the profile dropdown; instead, it adds a new label.
Instead of adding an aria-label
in renderProfileTriggerLabel
(line 272), you need to update renderProfileTrigger
and provide a correct ariaLabel
to the <NavButton>
there (line 248).
@zburke please take a look. I made requested changes |
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.
@UladzislauKutarkin, is there a reason you created a new translation key mainnav.profile.ariaLabel
instead of repurposing the existing one, mainnav.myProfileAriaLabel
?
Either reuse the existing one (preferable) or keep the new one and remove the old one.
@zburke Ye, you are right, I made new one key for prev implementation. Since we made new approach, I returned old translation key and deleted new one |
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.
LGTM! 👏 👏 👏
|
STCOR-753
Here I reproduced steps that was provided by @JohnC-80 in comments section.
We add
aria-label
forProfileDropdown
. Also, we removedaria-label
fromApp dropdown
.