-
Notifications
You must be signed in to change notification settings - Fork 214
fix: Make create form keyboard accessible COMPASS-9335 #6896
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
Conversation
name={`select-${item.id}`} | ||
data-testid={`select-${item.id}`} | ||
label={item[label[0]]} | ||
aria-labelledby="select-table-item-label" // I don't know why LG requires this, it seems ignored |
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.
This should reference another element that labels this checkbox right? Should we go back to the aria-label
?
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.
Ah! I tried to only include aria-label before but turns out it wasn't recognized and the labelledby was still required because the type of item[label[0]]
isn't clear. this made me realise that actually it sometimes (in case of import) isn't a string but an element, so it makes sense to take a separate key for aria-label.
Unfortunately it's still not clear for TS - hence the typecasting as string. I did make an attempt to type it so that:
a) either item[label.displayLabelKey]
is a string
b) orlabel.ariaLabelKey
is required and item[label.ariaLabelKey]
is a string.
But I couldn't get it working and it was getting overly complicated 🙈
a7a1b4f
to
17e3e72
Compare
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.
Looks good, one css usage we should move to a const at the top.
d59193d
to
83357dd
Compare
Description
Changes:
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes