mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Refactor Heading Elements for Screen Readers #1391

Open pt2302 opened 7 months ago

pt2302 commented 7 months ago

Description/Context

Headings are announced by screen readers; in the code, they are often used for font size. This makes the pages less usable by individuals with screen readers, since the headings are announced unnecessarily.

Plan/Design

Only use heading elements for "true" headings, and use different classes for manipulating font size.

pdpinch commented 7 months ago

Can you give an example?

What's the scope of this, or is that part of the issue?

pt2302 commented 7 months ago

Yes, a concrete example is https://github.com/mitodl/ocw-hugo-themes/blob/e5e073d43ff8c152b802a618862c707fbf7011e4/www/layouts/about/section.html#L511

I think that one approach will be to create or use custom font size tags and use those instead.