Skip to content

MAINT: Enable jsx-a11y lint and make the converter panel resizable by keyboard - #4074

Open
Everton (evertonrocha2) wants to merge 1 commit into
microsoft:mainfrom
evertonrocha2:a11y-jsx-lint
Open

Everton (evertonrocha2) wants to merge 1 commit into
microsoft:mainfrom
evertonrocha2:a11y-jsx-lint

Conversation

@evertonrocha2

Copy link
Copy Markdown

Description

Closes #3726.

Adds eslint-plugin-jsx-a11y to the frontend lint and makes its recommended rules blocking for production components (src/**/*.tsx, tests excluded). I triaged the 25 findings on current main:

Fixed (1)

  • The ConverterPanel resize handle only worked with a mouse. It's now a focusable role="separator" (WAI-ARIA window splitter): Left/Right resize by 16px, Home/End jump to the min/max width, and aria-valuenow/min/max expose the current width.

Handled in config (9)

  • no-noninteractive-tabindex also allows role="region" and role="separator", so labelled scroll regions (3) and the new splitter can take focus.
  • media-has-caption is off (6). Every <audio>/<video> here renders user-supplied attack content or target output, so there's no caption track to provide.

Inline disables, each with a reason (15 findings, 14 comments)

  • Tooltip wrappers around disabled controls (6) and a scorer metric value (1). A disabled Fluent control can't take focus, so the wrapper is focusable to let keyboard users reach the tooltip.
  • Two more scroll containers (a <section> and a <pre>) that need focus to scroll with the keyboard.
  • LabelsBar (2 elements, 4 findings). The pill's click handler only catches clicks on its own padding. The inner edit control already has role="button", tabIndex and onKeyDown.
  • ObjectiveHeader autoFocus: focus moves into the inline editor the user just opened.
  • TechniqueEditor: the onKeyDown only keeps Enter in a field from submitting the form.
  • ConverterPanel separator: jsx-a11y treats separator as non-interactive even when it's focusable (jsx-a11y/eslint-plugin-jsx-a11y#577).

Lint already runs with --report-unused-disable-directives, so a stale disable will fail CI too.

Notes

  • eslint-plugin-jsx-a11y 6.10.2 lists peer deps up to ESLint 9, but it runs fine on ESLint 10, and the repo's .npmrc already sets legacy-peer-deps. Happy to switch to the maintained fork eslint-plugin-jsx-a11y-x if you prefer. It gives the same results here.
  • Lockfile: adds the plugin's dependencies. The only existing package that changed is es-object-atoms (1.1.1 to 1.1.2, patch).
  • Possible follow-up, not in this PR: the disabled-control wrappers are generic <span>s with aria-label, which some screen readers ignore. Fluent's disabledFocusable on Button could replace most of them.

Tests and Documentation

  • New tests in ConverterPanel.test.tsx: the handle is exposed as a focusable separator with its current width, and Arrow/Home/End resize it within bounds.
  • npm run lint and tsc --noEmit pass. I also checked that a new <div onClick> in a component now fails lint.
  • Tests for every touched component pass. On the full suite, I see the same 3 failures with and without this change. They come from locale-dependent number formatting in analytics tests (my machine is pt-BR).
  • No docs changes.

… keyboard

Add eslint-plugin-jsx-a11y with its recommended rules as errors for production components. Make the ConverterPanel resize handle a focusable WAI-ARIA window splitter, and document the remaining triaged exceptions inline.

Closes microsoft#3726
Copilot AI balanced review requested due to automatic review settings November 9, 2026 01:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@romanlutz Roman Lutz (romanlutz) self-assigned this Nov 9, 2026
@evertonrocha2

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
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.

JSX accessibility lint finds 27 production-source violations requiring triage

3 participants