Changeset 284986 in webkit


Ignore:
Timestamp:
Oct 28, 2021 9:28:03 AM (9 months ago)
Author:
Razvan Caliman
Message:

Web Inspector: Audit: testForLinkLabels Accessibility audit should ignore anchors if aria-hidden
https://bugs.webkit.org/show_bug.cgi?id=231038
<rdar://problem/83783868>

Update testForLinkLabels accessibility audit test to exclude hidden links.
See AccessibilityObject->isHidden()

Reviewed by BJ Burg.

  • UserInterface/NonMinified/DefaultAudits.js:

(WI.DefaultAudits.testForLinkLabels):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r284958 r284986  
     12021-10-28  Razvan Caliman  <rcaliman@apple.com>
     2
     3        Web Inspector: Audit: testForLinkLabels Accessibility audit should ignore anchors if aria-hidden
     4        https://bugs.webkit.org/show_bug.cgi?id=231038
     5        <rdar://problem/83783868>
     6
     7        Update `testForLinkLabels` accessibility audit test to exclude hidden links.
     8        See `AccessibilityObject->isHidden()`
     9
     10        Reviewed by BJ Burg.
     11
     12        * UserInterface/NonMinified/DefaultAudits.js:
     13        (WI.DefaultAudits.testForLinkLabels):
     14
    1152021-10-27  BJ Burg  <bburg@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/NonMinified/DefaultAudits.js

    r277212 r284986  
    239239WI.DefaultAudits.testForLinkLabels = function() {
    240240    let links = WebInspectorAudit.Accessibility.getElementsByComputedRole("link");
    241     let domNodes = links.filter((link) => !WebInspectorAudit.Accessibility.getComputedProperties(link).label);
     241    let domNodes = links.filter((link) => {
     242        let properties = WebInspectorAudit.Accessibility.getComputedProperties(link);
     243        return !properties.label && !properties.hidden;
     244    });
    242245    return {level: domNodes.length ? "fail" : "pass", domNodes, domAttributes: ["aria-label", "aria-labelledby", "title"]};
    243246};
Note: See TracChangeset for help on using the changeset viewer.