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

Ensure skip to main content logic is working #12439

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

marcellamaki
Copy link
Member

Summary

Adds id=main on the div immediately surrounding the <slot/> in AppBarPage where the index page goes.

Note that this does not resolve some lingering semantic page structure issues where there are some ambiguous <main> elements in various plugins/pages, as the existing logic was not actually based on the HTML element but rather the id. My browser extension suggests that the addition of id=main on this div does not add additional main elements to the page that would be confusing (i.e. potentially multiple in a section, if a nested page already has an HTML <main>)

Reviewer guidance

Does skip to main work in all plugins?


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

…main so that skip to main content nav works in all plugins, and remove other instances of id=main.
@github-actions github-actions bot added APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) labels Jul 11, 2024
Copy link
Member

@radinamatic radinamatic left a comment

Choose a reason for hiding this comment

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

Tested all the pages that have the topbar with the main navigation with NVDA Speech viewer opened, and the Skip to main content is back in business! 👏🏽 💯 :shipit:

Thank you! 🙏🏽

@marcellamaki
Copy link
Member Author

After some discussion with @rtibbles (who is totally, definitely, absolutely not working today) on Slack, he confirmed the correct approach is migrating the id=main to the AppBarPage and Immersive page, and cleaning it up in other places. Other concerns raised on slack about the use of "main" more broadly (as a class name, <main> element, etc.) should be tracked in follow up, and some decisions should be main re: prioritization order for the logic, as well as a consistency for the accessible experience.

So, I'm going to use this + Radina's approval to go ahead and merge, after re-confirming that id=main now only exists in these two files, and that there will not be duplicate ids on the same page (as raised in slack discussion)
Screenshot 2024-07-11 at 7 08 45 PM

@marcellamaki marcellamaki merged commit 225e2a1 into learningequality:develop Jul 11, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants