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

add ARIA labels to input fields #2562

Merged
merged 3 commits into from
Aug 4, 2023
Merged

add ARIA labels to input fields #2562

merged 3 commits into from
Aug 4, 2023

Conversation

merobi-hub
Copy link
Collaborator

@merobi-hub merobi-hub commented Aug 3, 2023

Problem

Input fields in the Web UI are missing ARIA labels, which the OSSF Silver Badge requires to meet a11y standards.

Solution

This adds ARIA properties to the Web UI's input and text components used for user input and configures i18next to support the text in them. All have been tested with a screen reader and found to work as expected.

Note: All database schema changes require discussion. Please link the issue for context.

One-line summary: adds i18next-compliant ARIA labels to input fields

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

Signed-off-by: Michael Robinson <merobi@gmail.com>
@boring-cyborg boring-cyborg bot added the web label Aug 3, 2023
@merobi-hub merobi-hub requested a review from phixMe August 3, 2023 19:51
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #2562 (36f852c) into main (59f4552) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #2562   +/-   ##
=========================================
  Coverage     83.26%   83.26%           
  Complexity     1286     1286           
=========================================
  Files           243      243           
  Lines          5934     5934           
  Branches        279      279           
=========================================
  Hits           4941     4941           
  Misses          846      846           
  Partials        147      147           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -30,7 +30,7 @@ const SearchPlaceholder: React.FC<WithStyles<typeof styles>> = ({ classes }) =>
return (
<Box className={classes.root}>
<Box display={'inline'}>
<MqText disabled inline>
<MqText disabled inline aria-label={i18next.t('search.search_aria')} aria-required='true'>
{' '}
Copy link
Member

Choose a reason for hiding this comment

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

Why is there a space character here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question. I removed it along with a few other unnecessary spaces and standardized the font so the spacing is consistent without them.
Screenshot 2023-08-04 at 08 47 33

Signed-off-by: Michael Robinson <merobi@gmail.com>
@merobi-hub merobi-hub requested a review from phixMe August 4, 2023 12:49
Signed-off-by: Michael Robinson <merobi@gmail.com>
Copy link
Member

@phixMe phixMe left a comment

Choose a reason for hiding this comment

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

Looks Good @merobi-hub Thank you!

@merobi-hub merobi-hub merged commit 58ad3e3 into main Aug 4, 2023
@merobi-hub merobi-hub deleted the web/aria-labels branch August 4, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants