Skip to content

WCAG compliance#625

Open
m-mikulica wants to merge 13 commits into
pagefrom
wcag-improvements
Open

WCAG compliance#625
m-mikulica wants to merge 13 commits into
pagefrom
wcag-improvements

Conversation

@m-mikulica
Copy link
Copy Markdown
Collaborator

fix: accessibility and theming improvements

  • Add visually-hidden labels for search inputs (CC, FIPS, PP search pages, CVE/CPE vuln search)
  • Fix heading hierarchy: change "Search" subheading from h3 to h2 on all search pages
  • Add empty table header label "Actions" in FIPS MIP and IUT index tables
  • Refactor status badge colors: replace Bootstrap text-success/warning/danger with custom
    CSS classes (status-active, status-archived, status-historical, status-revoked) supporting
    separate light/dark mode colors via data-bs-theme selectors in base.css
  • Split btn-outline-primary color overrides into light (#0060F0) and dark (#85B6FF) themes
  • Add alert-primary link color override for light mode (#0a58ca)
  • Fix research link color in index page analysis section using CSS custom property override

- Add visually-hidden labels for search inputs (CC, FIPS, PP search pages, CVE/CPE vuln search)
- Fix heading hierarchy: change "Search" subheading from h3 to h2 on all search pages
- Add empty table header label "Actions" in FIPS MIP and IUT index tables
- Refactor status badge colors: replace Bootstrap text-success/warning/danger with custom
  CSS classes (status-active, status-archived, status-historical, status-revoked) supporting
  separate light/dark mode colors via data-bs-theme selectors in base.css
- Split btn-outline-primary color overrides into light (#0060F0) and dark (#85B6FF) themes
- Add alert-primary link color override for light mode (#0a58ca)
- Fix research link color in index page analysis section using CSS custom property override
- Add visually-hidden labels for search inputs (CC, FIPS, PP search pages, CVE/CPE vuln search)
- Fix heading hierarchy: change "Search" subheading from h3 to h2 on all search pages
- Add empty table header label "Actions" in FIPS MIP and IUT index tables
- Refactor status badge colors: replace Bootstrap text-success/warning/danger with custom
  CSS classes (status-active, status-archived, status-historical, status-revoked) supporting
  separate light/dark mode colors via data-bs-theme selectors in base.css
- Split btn-outline-primary color overrides into light (#0060F0) and dark (#85B6FF) themes
- Add alert-primary link color override for light mode (#0a58ca)
- Fix research link color in index page analysis section using CSS custom property override2
@jborsky jborsky self-requested a review April 9, 2026 11:24
@jborsky jborsky added the web Stuff related to the web at seccerts.org label Apr 9, 2026
@jborsky
Copy link
Copy Markdown
Collaborator

jborsky commented Apr 9, 2026

This should address #574.

Thanks. I'll review it in the coming days.

Worth noting that I'm currently reworking the search UX, so the version these accessibility fixes apply to will likely be replaced, though there won't be major UI changes, just more inputs, columns, filtering options and so on. I'll make sure to check accessibility before that lands. But everything outside the search is relevant.

Comment thread sec_certs_page/static/base.css Outdated
@jborsky
Copy link
Copy Markdown
Collaborator

jborsky commented Apr 20, 2026

I've tested the branch with WAVE and axe DevTools and still got some things flagged:

Main page

  • research link in the Trend Visualization section has insufficient contrast
  • Project, Quick links, and Contact us in the footer look like headings visually but aren't using actual heading tag, so screen readers won't treat them as headings

Certificate page (such as https://sec-certs.org/cc/bbfc9f8bead71236/)

Login page:

  • Sign in with email or GitHub has insufficient contrast in dark mode

Can you run through the tools again and make sure nothing is flagged?

Also, please manually verify that the page can be navigated using only a keyboard and that it functions well with screen readers. For instance, I wasn't able to select the feedback button on the side of the page using just the keyboard, which violates criterion 2.1.1 of the standard.

Here I also found a checklist that may be useful:
https://webaim.org/standards/wcag/checklist

Copy link
Copy Markdown
Collaborator

@jborsky jborsky left a comment

Choose a reason for hiding this comment

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

Need to resolve issues identified by automated tools and perform manual testing using a keyboard and screen reader.

@jborsky jborsky changed the title Wcag improvements WCAG compliance Apr 20, 2026
@jborsky jborsky linked an issue Apr 20, 2026 that may be closed by this pull request
@J08nY
Copy link
Copy Markdown
Member

J08nY commented Apr 20, 2026

  • Project, Quick links, and Contact us in the footer look like headings visually but aren't using actual heading tag, so screen readers won't treat them as headings

I thought I fixed this even before this PR. Hmm. Maybe not. Is there another way to make them like headings without being headings? Should they be headings?

  • aria-label attribute cannot be used on a span with no valid role attribute

I guess role=tooltip may work?

@jborsky
Copy link
Copy Markdown
Collaborator

jborsky commented Apr 20, 2026

I thought I fixed this even before this PR. Hmm. Maybe not. Is there another way to make them like headings without being headings? Should they be headings?

I think they should, as they label distinct groups of links. According to additional details from the flagged issue in the tool, it can be done using role="heading".

https://docs.deque.com/advanced-rules/1/en/advanced/heading-markup

- base.css: fix btn-link and btn-outline-primary contrast in light mode
  (Bootstrap default #0d6efd fails WCAG AA 4.5:1 on white)
- network.js: add aria-label to status <select> element (no accessible name)
- cc/entry/index.html.jinja2: add visually-hidden text to empty <th> elements;
  add role=img to bg-info badge spans
- common/base.html.jinja2: convert footer pseudo-heading <span> to <h2>
- fips/entry/index.html.jinja2: conditionally render vendor_www link
  (was rendering empty <a href=> when URL absent)
- feedback.html.jinja2: convert #feedback-button div to <button>,
  fix DOM order and focus management for keyboard navigation
@m-mikulica
Copy link
Copy Markdown
Collaborator Author

I did manual testing with WAVE tool and AXE accessibility on every page in both modes. The only errors I got were on the /cc/network/ page, where is the graph and the links inside have no discernible text. I also did manual testing of keyboard-only navigation on the website and it worked well.

…mple spans

- cc/entry: add aria-label and aria-hidden="true" to 9 badge <span role="img">
  elements so screen readers announce their meaning in browse mode
- cc/search, pp/search, vuln/search: remove role="button", tabindex, onclick,
  onkeydown and aria-label="Click to select text" from example query spans —
  these were falsely announced as interactive buttons; text remains readable
  in screen reader browse mode
@m-mikulica
Copy link
Copy Markdown
Collaborator Author

I just tested the whole page with Linux Orca screen reader and it works well. The only problem page is again the cc/network/ page with the graph, where it reads every one of 900+ nodes.

@m-mikulica
Copy link
Copy Markdown
Collaborator Author

Checked the new EUCC pages with ORCA screen reader and WAVE tool + AXE dev tools accessibility test and everything was alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web Stuff related to the web at seccerts.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.8. Examine and fix accessibility

3 participants