Skip to content
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

feat(TextArea, TextInput): use aria-describedby for error and note #904

Merged
merged 15 commits into from
Sep 5, 2023

Conversation

Kyzyl-ool
Copy link
Contributor

closes #860

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@Kyzyl-ool Kyzyl-ool changed the title feat: use label tag for error text feat: use aria-describedby for TextInput and error text Aug 17, 2023
@Kyzyl-ool Kyzyl-ool force-pushed the feat/a11y-improvements branch 2 times, most recently from 4eadbab to f7b36f8 Compare August 21, 2023 11:14
@korvin89
Copy link
Contributor

Could U add this changes to TextArea too?

@Kyzyl-ool
Copy link
Contributor Author

Could U add this changes to TextArea too?

Ready

@Kyzyl-ool Kyzyl-ool force-pushed the feat/a11y-improvements branch 3 times, most recently from 0ad03e0 to 559420c Compare August 23, 2023 07:16
@Kyzyl-ool Kyzyl-ool requested a review from ValeraS August 23, 2023 09:01
@Kyzyl-ool Kyzyl-ool force-pushed the feat/a11y-improvements branch 3 times, most recently from dda7e15 to 20e57fc Compare August 25, 2023 06:47
src/components/controls/TextArea/TextArea.tsx Outdated Show resolved Hide resolved
src/components/controls/TextArea/TextArea.tsx Outdated Show resolved Hide resolved
src/components/controls/TextArea/TextArea.tsx Outdated Show resolved Hide resolved
@Kyzyl-ool Kyzyl-ool force-pushed the feat/a11y-improvements branch 3 times, most recently from 30eb07a to 461e1a2 Compare September 5, 2023 10:39
@@ -46,31 +46,6 @@ $block: '.#{variables.$ns-new}text-area';
}
}

&__outer-additional-content {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also remove styles from 'TextInput.scss'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Missed

controlProps: {
...controlProps,
'aria-describedby': ariaDescribedBy || undefined,
'aria-invalid': Boolean(error) || undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check validationState instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right

@amje amje changed the title feat: use aria-describedby for TextInput and error text feat(TextArea, TextInput): use aria-describedby for error and note Sep 5, 2023
@amje amje merged commit d51039b into main Sep 5, 2023
3 checks passed
@amje amje deleted the feat/a11y-improvements branch September 5, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

link Input's error message label and input HTML element itself
5 participants