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

update-wv-107-frontend TEAM REVIEW #3980

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

pbnjcub
Copy link
Contributor

@pbnjcub pbnjcub commented Aug 14, 2024

What github.com/wevote/WebApp/issues does this fix?

WV-107

Changes included this pull request?

code to create checkboxes to filter by source code on map view

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@@ -19,7 +20,7 @@ function createSelect () {
// "[('AK', 'Alaska'), ('AL', 'Alabama'), ('AR', 'Arkansas')
const regex = /(\(.*?\))/gm;
const matches = Array.from(stateListString.matchAll(regex));
let selectComponent = "<span>Select a state: <select id='state_code' name='state_code'>";
let selectComponent = "<span style='display: inline-block;'>Select a state: <select id='state_code' name='state_code'>";
Copy link

Choose a reason for hiding this comment

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

Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.

const match = matches[i][1];
const selected = '';
if (match === 'PUBLIC_SCHOOLS') {
checkboxComponent += `<input type='checkbox' id='${match}' name='source_code' value='${match}' ${selected} />Public Schools `;
Copy link

Choose a reason for hiding this comment

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

Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.

if (match === 'PUBLIC_SCHOOLS') {
checkboxComponent += `<input type='checkbox' id='${match}' name='source_code' value='${match}' ${selected} />Public Schools `;
} else if (match === 'POST_OFFICE_LAT_LONG') {
checkboxComponent += `<input type='checkbox' id='${match}' name='source_code' value='${match}' ${selected} />Post Offices `;
Copy link

Choose a reason for hiding this comment

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

Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.

@DaleMcGrew
Copy link
Member

Great work @pbnjcub 👍

@DaleMcGrew DaleMcGrew merged commit 841c47b into wevote:develop Aug 15, 2024
4 checks passed
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.

2 participants