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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add forms input a11y docs #4125

Merged
merged 2 commits into from
Nov 19, 2021
Merged

Add forms input a11y docs #4125

merged 2 commits into from
Nov 19, 2021

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Nov 17, 2021

Done

add forms input a11y docs section

Fixes canonical/react-components#639

QA

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4125.demos.haus

- add aria-invalid to examples
@petermakowski
Copy link
Contributor Author

@bartaz I updated examples you mentioned. Interestingly enough, we already had a mention about aria-invalid in some places, e.g.: https://github.com/canonical-web-and-design/vanilla-framework/blob/a823311dc832a4cc3d303619930a7229bb8324b9/templates/docs/examples/patterns/forms/form-inline.html#L20

@elioqoshi
Copy link

elioqoshi commented Nov 19, 2021

@petermakowski sorry, not sure if I understand the QA steps correctly.

The input field on Chrome works fine when putting a wrong input in:

grafik

grafik

On Firefox, If I put in an invalid text string, I don't get a voiceover read out (don't mind the German):

grafik

@petermakowski
Copy link
Contributor Author

petermakowski commented Nov 19, 2021

@petermakowski sorry, not sure if I understand the QA steps correctly.

The input field on Chrome works fine when putting a wrong input in:

grafik grafik

On Firefox, If I put in an invalid text string, I don't get a voiceover read out (don't mind the German):

grafik

This PR only updates the documentation with steps required to implement accessibility using aria-invalid, it doesn't include all necessary JavaScript to make all interactive examples work.

You can test it with static examples, e.g. in the inline example
image

I updated the description with more details.

The issue that you mention above is because there is no JavaScript validation for this example at all - only default browser behavior. This is out of scope of this work.

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@bartaz
Copy link
Contributor

bartaz commented Nov 19, 2021

Works as expected:

Screenshot 2021-11-19 at 13 59 40

@bartaz bartaz merged commit f607b28 into main Nov 19, 2021
@bartaz bartaz changed the title add forms input a11y docs Add forms input a11y docs Nov 19, 2021
@bartaz bartaz deleted the add-input-a11y-docs branch April 28, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

input error is not indicated for assistive technologies
5 participants