Changeset 246655 in webkit


Ignore:
Timestamp:
Jun 20, 2019 3:06:51 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
https://bugs.webkit.org/show_bug.cgi?id=194754

Patch by Greg Doolittle <gr3g@apple.com> on 2019-06-20
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/img-alt-attribute-unassigned-value.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::computedRoleString const):

LayoutTests:

  • accessibility/img-alt-attribute-unassigned-value-expected.txt: Added.
  • accessibility/img-alt-attribute-unassigned-value.html: Added.
  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246649 r246655  
     12019-06-20  Greg Doolittle  <gr3g@apple.com>
     2
     3        Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
     4        https://bugs.webkit.org/show_bug.cgi?id=194754
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/img-alt-attribute-unassigned-value-expected.txt: Added.
     9        * accessibility/img-alt-attribute-unassigned-value.html: Added.
     10        * inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
     11
    1122019-06-20  Saam Barati  <sbarati@apple.com>
    213
  • trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt

    r222544 r246655  
    327327    exists: true
    328328    label: x
    329     role: img
     329    role: presentation
    330330    ignored: true
    331331    ignoredByDefault: true
     
    340340    exists: true
    341341    label:
     342    role: presentation
     343    ignored: true
     344
     345<img src="data:image/gif...">
     346    exists: true
     347    label:
    342348    role: img
    343     ignored: true
    344 
    345 <img src="data:image/gif...">
    346     exists: true
    347     label:
    348     role: img
    349349
    350350<img src="./404.gif">
    351351    exists: true
    352352    label:
    353     role: img
     353    role: presentation
    354354    ignored: true
    355355
     
    362362    exists: true
    363363    label:
    364     role:
     364    role: presentation
    365365    focused: false
    366366    ignored: true
     
    907907    exists: true
    908908    label:
    909     role:
     909    role: presentation
    910910    ignored: true
    911911    ignoredByDefault: true
     
    916916    exists: true
    917917    label:
    918     role:
     918    role: presentation
    919919    ignored: true
    920920    ignoredByDefault: true
     
    924924    exists: true
    925925    label:
    926     role:
     926    role: presentation
    927927    ignored: true
    928928    ignoredByDefault: true
     
    933933    exists: true
    934934    label:
    935     role:
     935    role: presentation
    936936    ignored: true
    937937    parentNodeId: exists
     
    962962    exists: true
    963963    label:
    964     role:
     964    role: presentation
    965965    ignored: true
    966966    parentNodeId: exists
     
    969969    exists: true
    970970    label:
    971     role:
     971    role: presentation
    972972    ignored: true
    973973    parentNodeId: exists
  • trunk/Source/WebCore/ChangeLog

    r246653 r246655  
     12019-06-20  Greg Doolittle  <gr3g@apple.com>
     2
     3        Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
     4        https://bugs.webkit.org/show_bug.cgi?id=194754
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Test: accessibility/img-alt-attribute-unassigned-value.html
     9
     10        * accessibility/AccessibilityObject.cpp:
     11        (WebCore::AccessibilityObject::computedRoleString const):
     12
    1132019-06-20  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r246490 r246655  
    24942494    AccessibilityRole role = roleValue();
    24952495
     2496    if (role == AccessibilityRole::Image && accessibilityIsIgnored())
     2497        return reverseAriaRoleMap().get(static_cast<int>(AccessibilityRole::Presentational));
     2498
    24962499    // We do not compute a role string for generic block elements with user-agent assigned roles.
    24972500    if (role == AccessibilityRole::Group || role == AccessibilityRole::TextGroup)
Note: See TracChangeset for help on using the changeset viewer.