-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enable accessibilityAudit on batches.test.ts
#33824
Conversation
Codenotify: Notifying subscribers in CODENOTIFY files for diff 061438d...d6a7579.
|
Codenotify: Notifying subscribers in OWNERS files for diff 061438d...d6a7579. No notifications. |
batches.test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, a few areas where we should be able to update the heading tags. LMK if this isn't possible
Rule: "heading-order" (Heading levels should only increase by one) | ||
To support accessibility rule here, we would need to use h3 tag, since PageHeader(on upper scope) renders h1 and h2 subsequently | ||
*/} | ||
<h5 className="a11y-ignore p-2 d-none d-md-block text-uppercase text-center text-nowrap">Status</h5> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a h3 tag?
It should be possible to do this and preserve styles using the WIldcard components
<H5 as={H3}>{label}</H5>
{(licenseAndUsageInfo?.allBatchChanges.totalCount || 0) > 0 && ( | ||
<h3 className="align-self-end flex-1">{lastTotalCount} batch changes</h3> | ||
<h3 className="a11y-ignore align-self-end flex-1">{lastTotalCount} batch changes</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to use H2
here too :)
Rule: "heading-order" (Heading levels should only increase by one) | ||
To support accessibility rule here, we would need to use h3 tag, since PageHeader(on upper scope) renders h1 and h2 subsequently | ||
*/} | ||
<h5 className="a11y-ignore p-2 d-none d-sm-block text-uppercase text-center">Current state</h5> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also update heading :)
Rule: "heading-order" (Heading levels should only increase by one) | ||
To support accessibility rule here, we would need to use h4 tag and have h2 somewhere in the page, since PageHeader(on upper scope) renders h1 tag and there is an h3 tag as well. | ||
*/} | ||
<h5 className="a11y-ignore"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also heading here
617221a
to
52b5248
Compare
52b5248
to
d6a7579
Compare
@gitstart-sourcegraph Looks like there are some visual regressions on the batch changes heading, please can we fix? |
// To fix accessibility rule: "heading-order" | ||
description: '## Very cool batch change', | ||
creator: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitstart-sourcegraph Looks like there are some visual regressions on the batch changes heading, please can we fix?
Hi @umpox, the UI diff as displayed in the percySnapshot occurs with respect to this fix we made here, which involved updating the test parameter from rendering an h3
(fails accessibility check: "heading-order") to instead render h2
(as header description in markdown with ##
).
BTW this would not have an effect on actual rendering on web app, since description is generated with user input.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, I missed that - sorry!
LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Description
batches
page in its integration testRefs
SG Issue
Gitstart Ticket
Test plan
Run the integration test
yarn test-integration:base client/web/src/integration/batches.test.ts
Success criteria
accessibilityAudit
enabledApp preview:
Check out the client app preview documentation to learn more.