Skip to content

Row stripes: four corner cases left after #1133 / #1156 #1161

Open

Description

@pbakaus

#1133 added side-tab on status rows and cells, and #1156 followed up on its review findings. Paul stopped the patch rounds there. These four corner cases are still open, and each one comes from text matching on selectors.

1. A selection attribute inside :not() reads as a selection (#1156, review comment 4365046292, crates/core/src/checks/row_stripe.rs)
td:not([data-state="selected"]) { box-shadow: inset 3px 0 0 red } loses its finding. The selection check matches the attribute even though the selector excludes it.

2. A mixed selector list with a rounded host elsewhere goes silent (#1156, review comment 4365046295, crates/html/src/engine.rs)
Take .row-card.is-error, td.is-error { …; box-shadow: inset 3px 0 0 red } with .row-card { border-radius: 12px } in another rule, on a page that has only the div.row-card. The card scan skips the whole list because it names td. The static engine's row filter then drops the rounded div as the card scan's job, so nothing reports.

3. row-* cell classes stop the browser row walk (#1156, review comment 4365058846, crates/core/src/browser/element_checks.rs)
The ancestor walk stops at any class with a row segment, including cells like .row-header or .row-actions. The real tr or [role=row] above is never reached, so its status or selection is ignored.

4. A small or one-sided radius on a class-named row (#1156, review comment 4364047713)
All three engines treat any non-zero radius on a class-named row as a card. The card scans report only when both corners away from the stripe are at least 4px. So a .row-card with border-radius: 2px, or rounded only on the stripe side, is reported by neither. That is consistent across the engines today, but it may not be the behaviour we want.

Proposed root fix

Add a small parsed-selector helper and use it in every engine instead of regexes over selector text. It would split a selector list into branches and each branch into compounds and combinators, and give the subject compound's tag, classes, attributes (name, operator, value) and roles, with what sits inside :not(), :is() and :has() kept apart. Then:

  • "Is this a row or cell", "is this a selection", "is this a status" and "is this a table or ARIA row" become questions about the subject compound. Negated parts never count, which fixes (1).
  • The card scans and the row scan decide per branch, so a list that mixes td with a class-named row is split rather than skipped whole, which fixes (2).
  • Class words are classified once, in a shared row/cell vocabulary, so the browser walk and the stylesheet scan agree on what a row is. row-header would be a cell, which fixes (3).
  • (4) is a product decision, whether a lightly rounded or stripe-side-only row is a card. With the helper, all three engines read that decision from one place.

AI-assisted (Claude), filed under instructions from pbakaus.

Activity

  1. added a commit that references this issue on Oct 24, 2026
  2. pbakaus commented on Oct 24, 2026

    @pbakaus
    OwnerAuthor

    5. A compact selector list is reported twice (#1156, review comment 4365246450, crates/detect/src/detect_text.rs, same_stripe)
    For .row-card.is-x,.row-card.is-y{box-shadow:inset 4px 0 0 red} followed by .row-card{border-radius:8px}, both the card finding and the row finding report. The card scan keeps the list's original comma spacing, while the row scan joins its branches with , , so the text comparison misses. The parsed-selector helper fixes this too, by comparing branches rather than text. The quick fix is to split both lists with split_commas_outside_parens and trim each branch.

    AI-assisted (Claude).

  3. added a commit that references this issue on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNew or reopened issue awaiting maintainer triage

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions