Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(a11y): added ariaInvalid and ariaDescribedby props to SDP #1896

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
Loading
from

Conversation

jrparish
Copy link
Contributor

  • ariaInvalid allows for more accessible form validation
  • ariaDescribedby allows users to use custom elements for the field description instead of the built in screenReaderMessage behavior.

@jrparish jrparish force-pushed the feature/aria-attrs branch 2 times, most recently from 85e8f4d to 55485d0 Compare January 13, 2020 19:36
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Can you elaborate on "allows for more accessible form validation"?

src/components/DateInput.jsx Show resolved Hide resolved
src/components/SingleDatePicker.jsx Show resolved Hide resolved
src/components/SingleDatePickerInput.jsx Show resolved Hide resolved
@ljharb ljharb requested a review from backwardok January 13, 2020 19:53
@jrparish
Copy link
Contributor Author

Can you elaborate on "allows for more accessible form validation"?

This attribute can be set to let a screen reader know a field is not valid.
For instance, a form may require a proper date. Say a user types in a partial date, which is invalid for the form, we would set aria-invalid to true to indicate to the user that the field is not correct.

src/components/DateInput.jsx Outdated Show resolved Hide resolved
src/components/DateInput.jsx Outdated Show resolved Hide resolved
src/components/DateInput.jsx Show resolved Hide resolved
src/components/SingleDatePickerInputController.jsx Outdated Show resolved Hide resolved
Copy link
Contributor

@backwardok backwardok left a comment

Choose a reason for hiding this comment

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

Changes look good to me from the a11y side!

I'll let someone who's more familiar with the codebase at large to give the approval.

@ljharb ljharb added the semver-minor: new stuff Any feature or API addition. label Jan 14, 2020
@ljharb ljharb requested a review from nkinser January 14, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor: new stuff Any feature or API addition.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.