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

[Issue #1397] process roadmap accessibility #2392

Merged
merged 6 commits into from
Oct 15, 2024

Conversation

doug-s-nava
Copy link
Collaborator

@doug-s-nava doug-s-nava commented Oct 7, 2024

Summary

Fixes #1397

Time to review: 20 mins

Changes proposed

  • update DOM structure on process page to follow best practices for lists (previously implemented as three invidual lists with one item each, rather than one list with three items)
  • update aria labels to make high level roadmap items more readable by screen readers
  • a few refactors for better readability of process page code

Context for reviewers

Test steps

  1. visit localhost:3000/process
  2. visit https://simpler.grants.gov/process
  3. VERIFY: the "high-level roadmap" section of each page matches visually
  4. turn on screen reader (cmd + fn + f5 probably)
  5. ctrl + opt + cmd + h to cycle through headings until you find "the high level roadmap"
  6. ctrl + opt + a to read the content
  7. VERIFY: roadmap headings are read out as "Step 1: Find" etc.

Additional information

note that requirement in the ticket specifying removal of "launch" aria text for the chevron icons seems to have already been fixed

@doug-s-nava doug-s-nava marked this pull request as ready for review October 7, 2024 20:14
Copy link
Contributor

@emilycnava emilycnava left a comment

Choose a reason for hiding this comment

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

Left a few questions, haven't tested locally yet.

Process: {
milestones: { high_level_roadmap_items },
},
} = useMessages() as unknown as IntlMessages;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might just be a me thing, but I'm not sure I understand what this section is doing, can you explain it a bit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure!

As far as I can tell from the docs, useMessages will always return all messages in use in the app. Since we only care about the high_level_roadmap_items messages, I destructured the return value from the hook to dig into just that part of the object. That way we don't have to use a long chain to index into the object when we want to reference the high_level_roadmap items. Does that make sense? Happy to do a quick call to discuss

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for asking and for the explanation. It looks like we could ditch useMessages() altogether and just iterate over the three roadmap items.

Copy link
Collaborator Author

@doug-s-nava doug-s-nava Oct 10, 2024

Choose a reason for hiding this comment

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

Yeah, this whole thing is kind of odd IMO. My take is we probably shouldn't be directly using the translation messages to determine this functionality. I'd rather have a concept of the roadmap item keys outside of the translation and use those to create translated text.

On the other side of things, useMessages seems to be created for the purpose of accessing next intl messages on the client side. Since this is a server component, we likely could access the messages directly as you're describing, but again, I think with a slightly bigger refactor that wouldn't be necessary. See https://next-intl-docs.vercel.app/docs/environments/server-client-components#option-3-providing-individual-messages

I'll take a crack at it.

Copy link
Contributor

@emilycnava emilycnava left a comment

Choose a reason for hiding this comment

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

Verified it works locally, checked out upstream branch, enabled voiceover etc. so LGTM!

Copy link
Contributor

@emilycnava emilycnava left a comment

Choose a reason for hiding this comment

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

Re-review post merge conflict

@doug-s-nava doug-s-nava force-pushed the dschrashun/1397-process-roadmap-accessibility branch from 3bf3d73 to 02bb96e Compare October 15, 2024 15:24
@doug-s-nava doug-s-nava merged commit e2d3622 into main Oct 15, 2024
11 checks passed
@doug-s-nava doug-s-nava deleted the dschrashun/1397-process-roadmap-accessibility branch October 15, 2024 16:12
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.

High-level roadmap markup is not semantic
3 participants