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

semantic (HTML5/ARIA) page structure in Source Interface #5986

Closed
9 tasks done
Tracked by #5972 ...
cfm opened this issue Jun 10, 2021 · 2 comments · Fixed by #6041
Closed
9 tasks done
Tracked by #5972 ...

semantic (HTML5/ARIA) page structure in Source Interface #5986

cfm opened this issue Jun 10, 2021 · 2 comments · Fixed by #6041
Assignees
Labels
a11y Issues related to accessibility

Comments

@cfm
Copy link
Member

cfm commented Jun 10, 2021

Description

Accessibility Lab recommendations include:

  • h1...hn hierarchy
  • HTML5 section elements
  • ARIA roles ("landmarks"), labels, and descriptions

Our findings include:

  • moving decorative img elements to CSS styles on semantic elements

User Research Evidence

WCAG 1.3.1 per #5972.

Progress

To invert the way things are usually done :-):

  1. First pass: Refactor for semantic markup (test in developer tools and screen-readers)
    • decorative img/hr/etc. elements: mark as FIXMEs to move to CSS styles on semantic elements
    • linters pass
    • tests pass
  2. Second pass: Audit in validators and accessibility tools (axe, WAVE), e.g.:
    • h1...hn hierarchy
    • HTML5 section elements
    • ARIA roles ("landmarks"), labels, and descriptions
  3. Third pass: CSS and images broken in first pass (test visually in browser)
    • FIXMEs
    • visual review
Path First Pass Second Pass Third Pass
securedrop/source_templates
├── banner_warning_flashed.html
├── base.html
├── error.html
├── first_submission_flashed_message.html
├── flashed.html
├── footer.html
├── generate.html
├── index.html
├── locales.html
├── login.html
├── logout.html
├── lookup.html
├── next_submission_flashed_message.html
├── notfound.html
├── session_timeout.html
├── tor2web-warning.html
├── use-tor-browser.html
└── why-public-key.html

Specific cases (could be filed as separate issues)

  • securedrop/source_templates/generate.html: p.explanation should be associated with p#codename
@cfm cfm added the a11y Issues related to accessibility label Jun 10, 2021
@cfm cfm self-assigned this Jun 10, 2021
cfm added a commit that referenced this issue Jun 22, 2021
These ALT attributes are effectively an accessibility shim, to
provide the desired narration of flashed messages pending a
more–semantically-minded refactoring in #5986 and #5987.

See discussion in
<#5996 (comment)>.
cfm added a commit that referenced this issue Jun 22, 2021
These ALT attributes are effectively an accessibility shim, to
provide the desired narration of flashed messages pending a
more–semantically-minded refactoring in #5986 and #5987.

See discussion in
<#5996 (comment)>.
cfm added a commit that referenced this issue Jun 22, 2021
These ALT attributes are effectively an accessibility shim, to
provide the desired narration of flashed messages pending a
more–semantically-minded refactoring in #5986 and #5987.

See discussion in
<#5996 (comment)>.
@cfm
Copy link
Member Author

cfm commented Jun 29, 2021

@zenmonkeykstop, I'm starting work on this with the assumption that this and #5987 will each take the form of an omnibus PR consisting of:

  1. refactored templates; and
  2. stylesheets updated accordingly, with the goal of making it as close as possible to a pixel-perfect markup-only refactoring, with no (visually apparent) UI/UX consequences.

Given this scope, is there a particular sequence or structure you'd like to see the PR follow for ease of review?

@zenmonkeykstop
Copy link
Contributor

zenmonkeykstop commented Jul 9, 2021

A single big PR is fine for this IMO, the scope isn't that massive and there isn't an obvious clean way to separate it given styles being used across multiple templates. If you are still thinking of a 3-phase approach, rebasing each phase's commits into one would be helpful but is not required.

Note that you may (will) encounter SASS modules shared between the SI and JI. If you do want separate PRs for both then you may need to either duplicate some modules or deal with breakage in the JI while you're working in the SI. If it's particularly egregious having dedicated SI or JI SASS is preferable IMO.

Also note there will probably be an impact on functional tests. You might need to clean those up as well after you're done with UI changes, especially if id/class names get changed as part of the process.

Otherwise, plan looks solid, have at it!

cfm added a commit that referenced this issue Aug 9, 2021
A refactoring like #5986 seems like a good opportunity for this kind of
reformatting.
cfm added a commit that referenced this issue Aug 16, 2021
A refactoring like #5986 seems like a good opportunity for this kind of
reformatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to accessibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants