-
Notifications
You must be signed in to change notification settings - Fork 45
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
Improve accesibility for Manage theme fonts page #271
Conversation
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.
Thanks so much for working on this!
I've left a couple of inline comments, but this needs to be rebased so it's up-to-date with the latest changes from the plugin. Please could you do that, and I'll take another look 🙇
<div> | ||
<RangeControl | ||
<div className="font-size-input"> | ||
<NumberControl |
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.
aria-label={ sprintf( | ||
/* translators: %s: Font Family. */ | ||
__( 'Remove %s Font Family' ), | ||
fontFamily.name || fontFamily.fontFamily | ||
) } |
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.
Nice!
<Button | ||
variant="tertiary" | ||
onClick={ toggleIsOpen } | ||
aria-expanded={ isOpen } | ||
aria-label={ | ||
isOpen | ||
? __( | ||
'Collapse Font Family', | ||
'create-block-theme' | ||
) | ||
: __( | ||
'Expand Font Family', | ||
'create-block-theme' | ||
) | ||
} | ||
> |
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.
👍
@@ -192,8 +192,9 @@ function ManageFonts() { | |||
<Button | |||
onClick={ toggleIsHelpOpen } | |||
style={ { padding: '0', height: '1rem' } } | |||
aria-label={ __( 'Alert Popup', 'create-block-theme' ) } |
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.
I'd maybe label this as something like 'More information' or 'Additional information', rather than 'Alert'.
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.
@mikachan Thanks for your feedback.
@mikachan I think we need to create another PR for it. there are many changes in the font page. |
Yeah that's true, it's probably easier to handle the changes in a new PR 👍 |
Thanks for your contribution! Font management is being handled by core now, so we're working towards removing it from the plugin on the next release. |
Issue: #230
The expand/collapse icon on each font family heading is missing a label. I think we should add a label based on these best practices.
-> Add
aria-expands: true/false
based on the user action, Also addedaria-label
to the button andaria-hidden: true
for icon.It would be good to add the name of the font family in each remove button, so it's clear which font family they are linked to. For example, add an aria-label with the contents, "Remove DM Sans font family".
-> Add
aria-label
for button andaria-hidden: true
for icon.Similar to above, it would be good to add an aria-label to the font face buttons too.
-> Similarlly, Adds
aria-label
for button andaria-hidden: true
for icon.The tab order of the font size range control is reversed because the flex-direction is set to row-reverse. This is probably because the RangeControl component only allows for the input to be shown on the right, and in this case, it works better on the left. I'm not sure what's possible here but thought it was worth mentioning. Maybe we could look into changing the tab order somehow.
All checked item has been improved, the last one is pending. Last item needs discussion, how we can improve that? Needs
you opinion.