Skip to content

Commit 2214fa4

Browse files
fix: <hx role="none"> is reported as heading. (#7377)
#### Details Fixed the headings are tagged with role="none" in assessment and Adhoc tools. ##### Motivation Addresses Issue - #7362 ##### Context Added role=none rule <!-- Were there any alternative approaches you considered? What tradeoffs did you consider? --> #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [X] Addresses an existing issue: [https://github.com/microsoft/accessibility-insights-web/issues/7362](https://github.com/microsoft/accessibility-insights-web/issues/7362) - [X] Ran `yarn fastpass` - [X] Added/updated relevant unit test(s) (and ran `yarn test`) - [X] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage` - [X] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`. - [ ] (UI changes only) Added screenshots/GIFs to description above - [ ] (UI changes only) Verified usability with NVDA/JAWS --------- Co-authored-by: Vikash Yadav <v-viyada@microsoft.com>
1 parent b6d299a commit 2214fa4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/scanner/custom-rules/heading-rule.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3+
import * as AxeUtils from '../axe-utils';
34
import { IAxeCheckResultExtraData, RuleConfiguration } from '../iruleresults';
45

56
const headingCheckId: string = 'collect-headings';
@@ -15,6 +16,7 @@ export const headingConfiguration: RuleConfiguration = {
1516
id: 'collect-headings',
1617
selector: 'h1,h2,h3,h4,h5,h6,[role=heading]',
1718
any: [headingCheckId],
19+
matches: AxeUtils.getMatchesFromRule('heading-order'),
1820
enabled: false,
1921
},
2022
};

0 commit comments

Comments
 (0)