-
Notifications
You must be signed in to change notification settings - Fork 152
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
InputField accessibility improvements #4632
Conversation
Storybook staging is available at https://kiwicom-orbit-sarka-inputselect-a11y-fixes.surge.sh Playroom staging is available at https://kiwicom-orbit-sarka-inputselect-a11y-fixes.surge.sh/playroom |
Size Change: +14 B (0%) Total Size: 461 kB
ℹ️ View Unchanged
|
Deploying orbit with
|
Latest commit: |
08e9b6e
|
Status: | ✅ Deploy successful! |
Preview URL: | https://8124c3fe.orbit.pages.dev |
Branch Preview URL: | https://sarka-inputselect-a11y-fixes.orbit.pages.dev |
d7d48ed
to
1ecbc01
Compare
docs/src/documentation/03-components/05-input/inputfield/03-accessibility.mdx
Show resolved
Hide resolved
1ecbc01
to
3cd439a
Compare
prefix && <Prefix>{prefix}</Prefix> | ||
)} | ||
{label && inlineLabel && ( | ||
<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.
Something is off about this implementation. When one presses the label, the input should receive focus. And if it has an help or error tooltip, it should be triggered. But with this change this is not happening 😕 Please take a look at it 🙏
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.
Should be fixed. The tricky part was, that the component includes FakeInput (it's responsible for focus outline) with absolute positioning and it covered the label (there was not set z-index), so click was not possible.
docs/src/documentation/03-components/05-input/inputfield/03-accessibility.mdx
Show resolved
Hide resolved
ec2fc2a
to
87569b4
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.
Key Issues
The CountryFlag component needs an appropriate aria-label to enhance accessibility for screen readers, as the name prop alone is insufficient.
1b1d00b
to
1323884
Compare
1323884
to
08e9b6e
Compare
Closes https://kiwicom.atlassian.net/browse/FEPLT-2248
✨
Description by Callstackai
This PR introduces accessibility improvements for the
InputField
component, including the addition ofariaLabelledby
prop and enhancements to the documentation regarding accessibility usage.Diagrams of code changes
Files Changed
ariaLabelledby
prop to the InputField props type definition.This PR includes files in programming languages that we currently do not support. We have not reviewed files with the extensions
.mdx
,.md
. See list of supported languages.