Skip to content

Commit 32c3c05

Browse files
rajathmr2000claude
andcommitted
AXE-3625: Trim bulk-review code comments to one-liners
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d183a34 commit 32c3c05

7 files changed

Lines changed: 8 additions & 23 deletions

File tree

lib/checks/keyboard/focusable-disabled-evaluate.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ function focusableDisabledEvaluate(node, options, virtualNode) {
3838
? undefined
3939
: false;
4040

41-
// a11y-rule-aria-hidden-focus: surface the focusable descendants for the
42-
// bulk-review "Review Hidden Elements" visual helper. Reuse DqElement.selector
43-
// (the same format-aware path relatedNodes uses) so the list and the overlay
44-
// share identical selectors; no new computation. Wrapped so any failure to
45-
// build the payload (e.g. an unexpected node) can never fail the check/scan.
41+
// a11y-rule-aria-hidden-focus: emit focusable descendants for bulk review; additive, guarded.
4642
try {
4743
this.data({
4844
reviewPayload: {

lib/checks/keyboard/focusable-not-tabbable-evaluate.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ function focusableNotTabbableEvaluate(node, options, virtualNode) {
3838
? undefined
3939
: false;
4040

41-
// a11y-rule-aria-hidden-focus: surface the focusable descendants for the
42-
// bulk-review "Review Hidden Elements" visual helper. Reuse DqElement.selector
43-
// (the same format-aware path relatedNodes uses) so the list and the overlay
44-
// share identical selectors; no new computation. Wrapped so any failure to
45-
// build the payload (e.g. an unexpected node) can never fail the check/scan.
41+
// a11y-rule-aria-hidden-focus: emit focusable descendants for bulk review; additive, guarded.
4642
try {
4743
this.data({
4844
reviewPayload: {

lib/checks/navigation/identical-links-same-purpose-after.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ function identicalLinksSamePurposeAfter(results) {
8484
currentResult.result = undefined;
8585
}
8686

87-
/**
88-
* The node's own DqElement is stored at `relatedNodes[0]` by the evaluate
89-
* fn; capture it before `relatedNodes` is rebuilt so the link group can
90-
* include the primary link, not just its same-name siblings.
91-
*/
87+
// primary link's DqElement is at relatedNodes[0]; capture before rebuild.
9288
const currentNode = currentResult.relatedNodes[0];
9389

9490
/**

lib/checks/parsing/duplicate-id-evaluate.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function duplicateIdEvaluate(node, options = {}) {
1717
this.relatedNodes(matchingNodes);
1818
}
1919

20+
// a11y-rule-duplicate-id-aria: emit duplicate id + sharing elements for bulk review when enabled.
2021
if (options.reviewPayload) {
2122
const verdict = matchingNodes.length === 0;
2223
const data = { id };

test/checks/navigation/identical-links-same-purpose-after.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ describe('identical-links-same-purpose-after tests', function () {
200200
var results = check.after([nodeOneData, nodeTwoData]);
201201
assert.lengthOf(results, 1);
202202

203-
// full group: the primary link plus every same-name sibling, each entry a
204-
// DqElement.selector array identical to relatedNodes[].selector
203+
// full group (primary + same-name siblings), each a DqElement.selector array
205204
var visualHelperData = results[0].data.reviewPayload.visualHelperData;
206205
assert.deepEqual(visualHelperData.identicalLinks, [
207206
['#card-1 > a.read-more'],

test/checks/parser/duplicate-id-aria.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ describe('duplicate-id-aria', function () {
3333
assert.equal(checkContext._data.id, 'dup');
3434
var visualHelperData = checkContext._data.reviewPayload.visualHelperData;
3535
assert.equal(visualHelperData.duplicateId, 'dup');
36-
// the OTHER elements sharing the id (relatedNodes), each a
37-
// DqElement.selector array identical to relatedNodes[].selector
36+
// the other elements sharing the id, each a DqElement.selector array
3837
assert.lengthOf(visualHelperData.elements, 2);
3938
assert.isArray(visualHelperData.elements[0]);
4039
assert.isString(visualHelperData.elements[0][0]);

test/checks/parser/duplicate-id.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ describe('duplicate-id', function () {
3232
});
3333

3434
it('keeps data a plain id string and emits no reviewPayload when the reviewPayload option is off', function () {
35-
// Guards the static/active duplicate-id checks: they share this evaluate
36-
// but never pass the reviewPayload option, so they must keep string data.
35+
// static/active checks share this evaluate but never set the option.
3736
fixture.innerHTML = '<div id="target"></div><div id="target"></div>';
3837
var node = fixture.querySelector('#target');
3938
assert.isFalse(
@@ -56,8 +55,7 @@ describe('duplicate-id', function () {
5655
});
5756

5857
it('removes duplicates for object-shaped data (shared after with the aria variant)', function () {
59-
// The shared after dedupes by data.id when data is an object
60-
// ({ id, reviewPayload }), as emitted by the aria (bulk-review) variant.
58+
// shared after dedupes object data by data.id (aria variant shape).
6159
assert.deepEqual(
6260
checks['duplicate-id'].after([
6361
{ data: { id: 'a' } },

0 commit comments

Comments
 (0)