davsclaus opened a new pull request, #1888:
URL: https://github.com/apache/camel-website/pull/1888

   Refs #1880
   
   ## Analysis
   
   - **Focus:** six components set `outline: none` with no replacement, and the 
site had no general focus style. Because of the cascade layers in `site.css`, a 
later-layer `outline: none` would beat any base rule, so the `outline: none` 
rules have to go.
   - **Copy button:** the code-block copy button was hidden with `visibility: 
hidden` until hover. A hidden button can't take focus, so keyboard users could 
never reach it.
   - **Skip link and target:** no layout had a skip link. Fifteen Hugo layouts 
and the Antora `main.hbs` have a `<main>`, but none had an id. 
`_default/section.html` had no `<main>` at all.
   - **Heading order:** the docs nav title was an `<h3>` before the page `<h1>`.
   - **`wcag/h30` (link text), Hugo output (main):** 9,711 findings. All come 
from templates:
     - the icon-only GitHub link in the navbar;
     - the five footer social icons;
     - the empty `<a class="anchor">` heading anchors in the release-note 
templates.
   - **`wcag/h63` (`th` scope), Hugo output (main):** 1,329 findings. They come 
from the release and download tables, plus Markdown tables in content.
   - **Live docs pages** (Kafka component, split EIP, manual index, a Quarkus 
extension) still produce `h30` from the Asciidoctor section and option anchors 
and `h63` from every Asciidoctor table. That is docs content, not UI, so both 
rules can't be errors yet.
   
   ## Changes
   
   **Focus ring**
   - New `--color-focus-ring: #c9620f`, used by one `:focus-visible` rule (2px, 
offset 2px).
   - The colour was chosen to clear 3:1 on every light surface (paper, paper-2, 
white, orange-tint; 3.41:1 or more) and every dark one (ink, ink-2, dark-2, 
dark-3, dark-line; 3.27:1 or more). The same ring works on the navbar, footer, 
code blocks and the home page's dark bands without per-surface overrides.
   - Removed `outline: none` from:
     - `.navbar-burger` (and its `:focus` rule)
     - `.nav-toggle`
     - `.nav-item-toggle`
     - the copy button
     - the page versions select
     - `.toc-menu a`
   - The nav and TOC are scroll containers, so their rings are drawn inside 
(`outline-offset: -2px`).
   - The rings that already existed (DocSearch button, home paths, footer 
column toggles) are unchanged.
   
   **Copy button**
   - The code-block toolbox is now hidden with `opacity: 0; pointer-events: 
none` instead of `visibility: hidden`. It shows on hover or `:focus-within`, so 
the copy button can be focused with the keyboard.
   
   **Skip link**
   - "Skip to content" is the first focusable element on every page: in Hugo 
`header.html`, and in Antora `header.hbs` (before `header-content.hbs`, to keep 
clear of #1883).
   - It is hidden above the viewport until focused, then shows over the navbar.
   - The target is `<main id="main-content">`, now on every Hugo `<main>` and 
on Antora `main.hbs`. `_default/section.html` gets a `<main>`.
   - The id is `main-content` rather than `content`, so it can't collide with a 
heading id generated from a "Content" heading.
   
   **Docs heading order**
   - `nav-menu.hbs`: the nav title is now `<p class="title">`. The selector 
became `.nav-menu > .title`, and the look is unchanged.
   
   **Link text and table headers**
   - The icon-only GitHub link (Hugo and Antora) and the footer social links 
get `aria-label`, and their SVGs get `aria-hidden="true"`.
   - The decorative heading anchors in the release-note templates get 
`aria-hidden="true" tabindex="-1"`. The heading keeps its id, so deep links 
still work.
   - The release and download table headers get `scope="col"`.
   
   **`html-validate`**
   - `wcag/h30` and `wcag/h63` are on again, as `warn`.
   - So the docs content doesn't add hundreds of thousands of lines to the CI 
log, `check:html` now uses a small formatter, 
`scripts/html-validate-formatter.js`. It prints errors in full as before. 
Warnings are only counted, and the runner prints one total per rule at the end, 
e.g. `check:html: warning wcag/h63: 297 in 38 files`.
   
   **Rebuilt UI bundle**
   - `antora-ui-camel/public` is committed with the rebuilt files, as in 
earlier UI changes.
   
   ## Verification
   
   - **UI theme:** `gulp lint` and `gulp test` (33 pass) pass, and `gulp 
bundle` builds.
   - **Root tests:** `yarn test`, 23 pass.
   - **Hugo build** (with `GITHUB_TOKEN`, then `CAMEL_ENV=production gulp 
minify`), then `yarn check:html`:
     - It exits 0 with no errors.
     - `wcag/h30` drops from 9,711 to **0** on the Hugo pages.
     - `wcag/h63` drops from 1,329 to **297 in 38 files**. All of these are 
Markdown tables in content, mostly blog/2026, plus the community pages and the 
security list.
   - **Skip link target:** all 1,002 Hugo pages that render the header contain 
exactly one `id="main-content"`.
   - **UI preview in headless Chrome, tabbing through `code.html`:**
     - The skip link is the first stop and shows over the navbar.
     - Every stop has the 2px `#c9620f` ring, including the burger/nav toggles, 
the version select and the copy buttons (which now appear when focused).
     - The first heading is the `<h1>`.
   - **Not checked locally:** the full Antora docs build. CI's `build-all` and 
`checks` cover it.
   
   ## Follow-ups (why this is "Refs", not "Fixes")
   
   - **Add `scope` to Markdown and Asciidoctor tables.** Hugo 0.121 has no 
table render hook; it is available after the Hugo upgrade (#1882). For the 
docs, this needs an Asciidoctor/Antora extension or a post-build pass.
   - **Handle the Asciidoctor section and option anchors in the docs content** 
(`aria-hidden`, or a label).
   - **Once both are done, switch `wcag/h30` and `wcag/h63` to `error`.**
   - **`layouts/security/list.html` table headers have no `scope`.** I left 
them alone because #1877 is reworking that page.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_016Y4dDj46SB6GniXf8mX2U6
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] Accessibility: focus rin... davsclaus (via GitHub) via commits

Reply via email to