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

Audit usage of header elements in Learner Dashboard #531

Open
MaxFrank13 opened this issue Dec 13, 2024 · 2 comments
Open

Audit usage of header elements in Learner Dashboard #531

MaxFrank13 opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
a11y Relates to platform accessibility good first issue A good task for a newcomer to start with

Comments

@MaxFrank13
Copy link
Member

Headers (ie. h1, h2, h3,... tags) should be used carefully as they are really important for making pages accessible.

Resources

Confluence page on how to use headers

Multiple uses of an h1 tag

There should only be one h1 tag per page. Having more will potentially confuse a11y tools.

The usage that seems correct at first glance is in the Dashboard component where a pageTitle is rendered as an h1 (source). This appears to be correct but we should verify.

There are at least two other places where an h1 is used:

We’ll want to change these according to where they are in the layout.

h2 being used as a spacer

An h2 element is being used to create white space in the layout for Learner Dashboard (source):

Screenshot 2024-09-26 at 8 46 01 AM

Setting the element to a div doesn’t immediately fix the issue:

Screenshot 2024-09-26 at 8 47 25 AM

There are custom styles being applied to the course-list-title class that are actually controlling the layout.

This is a problem because h2 should never be used for this purpose. There is no screen reader text or anything to indicate that this is used for accessibility in any way.

We should try to find a way to achieve the same layout/view/look without using an h2 for the spacing.

Other usage of headers

We should verify that all other uses of header tags are up to accessibility standards and being used properly according to the doc.

Acceptance Criteria

  • There is only one h1 and it follows best practice for what an h1 should be (see doc)
  • h2 is no longer used for spacing the layout
  • Assess other uses of header elements
  • If they are trivial, fix them
  • If not, make follow up tickets as necessary
  • The layout looks the same as before with no visual or behavioral changes in desktop and mobile views.
  • A commit mentions the improvement for screen reader experiences
@MaxFrank13 MaxFrank13 added good first issue A good task for a newcomer to start with a11y Relates to platform accessibility labels Dec 13, 2024
@navyanihitha
Copy link

Hi @MaxFrank13, I'm interested to work on this, could this issue be assigned to me.

@MaxFrank13
Copy link
Member Author

Absolutely! Thanks for picking it up

@deborahgu deborahgu moved this to In Progress in Aperture-Maintained Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Relates to platform accessibility good first issue A good task for a newcomer to start with
Projects
Status: In Progress
Development

No branches or pull requests

2 participants