-
Notifications
You must be signed in to change notification settings - Fork 101
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
fix(ui-color-picker): add hex to aria-label #1857
fix(ui-color-picker): add hex to aria-label #1857
Conversation
|
<Tooltip | ||
renderTip={<div>{color}</div>} | ||
elementRef={(element) => { | ||
if ( |
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-describedby
on the Tooltip's button has to be removed otherwise the Tooltip
text is read aloud by screenreaders - we want to avoid this here because the aria-label
has the same content in it already. I am using the Tooltip
's elementRef
property and the Element's API call to access the button.
{...(this.isSelectedColor(color) ? { 'aria-label': 'selected' } : {})} | ||
{...{ | ||
'aria-label': `${color}${ | ||
this.isSelectedColor(color) ? ' selected' : '' |
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.
If the color is selected, I append the 'selected' text to the hex code so the user gets information about that through the screenreader.
Don't forget to merge the commits into a single 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.
nice work :)
INSTUI-4273
384f699
to
04eedba
Compare
INSTUI-4273
Test:
ColorPreset
andColorContrast
separately, go to the docs page examples