Skip to content

fix(rules): a11y style reader reads vendor-prefixed display values #978 - #979

Merged
nc9 merged 1 commit into
mainfrom
fix/978-vendor-display
Oct 21, 2026
Merged

nc9 merged 1 commit into
mainfrom
fix/978-vendor-display

Conversation

@nc9

@nc9 nc9 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

What

Vendor-prefixed display keywords (-webkit-box, -webkit-inline-box, -webkit-flex, -webkit-inline-flex, -ms-flexbox, -ms-inline-flexbox, -ms-grid, -ms-inline-grid, -moz-box, -moz-inline-box) are read as shown values. The old flexbox fallback chain no longer makes the whole rule unreadable, so it can be show-only (#940) and an unnamed control under it gets a decided fail.

Chromium drops -ms-* and -moz-* values (checked in headless shell). A block is therefore settled only when a later standard display overrides such a value (display:-ms-flexbox;display:flex). As the last word, or with !important ahead of a plain one, the block stays unknown. display:none last in a chain still hides. var(--x), misspelt prefixed keywords, two-keyword syntax, ruby-base stay unknown.

Tests

New page-styles-vendor-display-978.test.ts (issue repro table through button-name and aria-command-name, reader cases, controls) and 9 Chromium-rendered rows in static-hidden-chromium.json. 9 of the new tests fail against the old source. Codex pass found ruby-base values (Chromium drops them): removed. Docs: solution text of the a11y naming rules and the button-name and aria-hidden-focus pages say prefixed values are read; tangly check --strict passes.

Closes #978

skills: no change

@claude

claude Bot commented Oct 21, 2026

Copy link
Copy Markdown

Review of #979 (vendor-prefixed display keywords in page-styles.ts).

No blocking issues found. I read the diff and traced the engines.pending logic by hand. I did not run the test suite.

  • The pending flag is set only after the "earlier !important wins" early return. So display:-ms-flexbox!important;display:flex stays unknown, which matches the intent and the test.
  • A later standard display value, or display:none, clears the flag. Any later unreadable value already forces unknown.
  • (low) -webkit-* values are treated as shown in every engine. That holds for Chromium, which the fixture rows cover. Firefox and Safari also accept the -webkit- aliases, so I think this is fine, but the fixtures only check Chromium.
  • (nit) engines is an { pending: boolean } object passed through as an out-parameter. It works, but a small state struct or a return value would be easier to read if readHidingDeclaration gains more state later.
  • (nit) A test combining a stylesheet rule with an inline style that carries an engine-dependent value would confirm the cascade merge path. The current tests mostly use a single block.

Test coverage is good: the issue's repro table, the reader edge cases, and 9 Chromium-rendered fixture rows. The docs and CHANGELOG are updated.

@nc9
nc9 merged commit 0f6229e into main Oct 21, 2026
15 checks passed
@nc9
nc9 deleted the fix/978-vendor-display branch October 21, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a11y style reader: a vendor-prefixed display value (-webkit-box, -webkit-flex, -ms-flexbox) leaves controls unconfirmed instead of decided

1 participant