Visitar URL original
chore: use fromPrimitive instead of fromPrimative by straker · Pull Request #5494 · dequelabs/axe-core · GitHub
Skip to content

chore: use fromPrimitive instead of fromPrimative - #5494

Open
straker wants to merge 1 commit into
developfrom
from-primitive
Open

straker wants to merge 1 commit into
developfrom
from-primitive

Conversation

@straker

@straker straker commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This should have been done in #5270. Just using the correct function.

@straker
straker requested a review from a team as a code owner October 21, 2026 22:15
Copilot AI balanced review requested due to automatic review settings October 21, 2026 22:15

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.

🟢 Approval recommended

The replacements preserve arguments and use the same underlying implementation, with no unresolved issues identified.

No open issues 🎉

What changed in this PR

Completes the spelling cleanup from #5270 by switching internal matching helpers to fromPrimitive instead of the deprecated fromPrimative wrapper.

Changes:

  • Updates imports and calls across eight matching helpers.
  • Preserves existing arguments and matching behavior without removing the compatibility wrapper.
File Description
lib/​commons/​matches/​semantic-role.js Updates semantic-role matching calls.
lib/​commons/​matches/​node-name.js Updates node-name matching calls.
lib/​commons/​matches/​is-summary-for-details.js Updates summary/details matching calls.
lib/​commons/​matches/​in-sectioning-content.js Updates sectioning-content matching calls.
lib/​commons/​matches/​implicit-role.js Updates implicit-role matching calls.
lib/​commons/​matches/​has-accessible-name.js Updates accessible-name matching calls.
lib/​commons/​matches/​from-function.js Updates function-result matching calls.
lib/​commons/​matches/​explicit-role.js Updates explicit-role matching calls.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Performance comparison

axe metric: 🟢 No significant regression (worst: /sites/very-large-page at +0.7% median, +168ms)

Base 6b52b84 vs head 6fb66e2.

Site Cold start Median Max
/sites/mdn 2,243ms → 2,210ms (-1.5%) 1,798ms → 1,720ms (-4.4%) 1,971ms → 1,887ms (-4.3%)
/sites/very-large-page 26,069ms → 25,039ms (-4.0%) 23,747ms → 23,915ms (+0.7%) 24,009ms → 24,363ms (+1.5%)

The performance comparison bot is just a rough check for spotting problems and is not authoritative. Just because something shows as being faster or slower than the current base does not mean it is true. All performance problems should be investigated manually.

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.

2 participants