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 label to the customer account block link #46899
Add aria label to the customer account block link #46899
Conversation
Hi @imanish003, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
1 similar comment
Hi @imanish003, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
…mmerce-blocks, woocommerce
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.
Hey @samueljseay,
I tested the changes & it's working as expected. Although, I have one quick question:
Would it be problematic if we added "aria-label" for all display styles? AFAIU We aren't adding it because there is following span in case of other display styles:
<span class="label">My Account</span>
But I don't think it will be problematic to have both i.e. this span & aria-label 🤔
Yes it would be problematic to use for all display styles because it would override the actual text of the element to provide the label in screen readers. At worst its confusing if someone changes the text in future, at best its redundant. Basically we should only provide it when there is no text available. |
@samueljseay That makes sense. Thanks for sharing your rationale behind it 🙌🏻 |
Changes proposed in this Pull Request:
As mentioned in #46754 there is no aria-label on the customer account when the setting is icon-only. It makes sense to add this to improve a11y in this situation.
Closes #46754 .
How to test the changes in this Pull Request:
Changelog entry
Significance
Type
Message
Add aria-label to customer account block link when in icon-only display mode.
Comment