Changeset 216009 in webkit


Ignore:
Timestamp:
May 1, 2017 12:56:18 AM (7 years ago)
Author:
jdiggs@igalia.com
Message:

AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
https://bugs.webkit.org/show_bug.cgi?id=171475

Reviewed by Chris Fleizach.

Source/WebCore:

If the author has provided a valid value, return it. Otherwise, return 0.

No new tests needed. Update existing test expectations to reflect the change.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::ariaColumnCount):
(WebCore::AccessibilityTable::ariaRowCount):

LayoutTests:

  • accessibility/table-detection-expected.txt: Updated.
  • accessibility/table-with-rules-expected.txt: Updated.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r216008 r216009  
     12017-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
     4        https://bugs.webkit.org/show_bug.cgi?id=171475
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/table-detection-expected.txt: Updated.
     9        * accessibility/table-with-rules-expected.txt: Updated.
     10
    1112017-05-01  Carlos Garcia Campos  <cgarcia@igalia.com>
    212
  • trunk/LayoutTests/accessibility/table-detection-expected.txt

    r198356 r216009  
    3939AXColumnCount: 2
    4040AXRowCount: 2
    41 AXARIAColumnCount: -1
    42 AXARIARowCount: -1
     41AXARIAColumnCount: 0
     42AXARIARowCount: 0
    4343AXElementBusy: 0
    4444
     
    8686AXColumnCount: 2
    8787AXRowCount: 1
    88 AXARIAColumnCount: -1
    89 AXARIARowCount: -1
     88AXARIAColumnCount: 0
     89AXARIARowCount: 0
    9090AXElementBusy: 0
    9191
     
    167167AXColumnCount: 2
    168168AXRowCount: 1
    169 AXARIAColumnCount: -1
    170 AXARIARowCount: -1
     169AXARIAColumnCount: 0
     170AXARIARowCount: 0
    171171AXElementBusy: 0
    172172
     
    213213AXColumnCount: 2
    214214AXRowCount: 1
    215 AXARIAColumnCount: -1
    216 AXARIARowCount: -1
     215AXARIAColumnCount: 0
     216AXARIARowCount: 0
    217217AXElementBusy: 0
    218218
     
    259259AXColumnCount: 2
    260260AXRowCount: 2
    261 AXARIAColumnCount: -1
    262 AXARIARowCount: -1
     261AXARIAColumnCount: 0
     262AXARIARowCount: 0
    263263AXElementBusy: 0
    264264
     
    306306AXColumnCount: 2
    307307AXRowCount: 1
    308 AXARIAColumnCount: -1
    309 AXARIARowCount: -1
     308AXARIAColumnCount: 0
     309AXARIARowCount: 0
    310310AXElementBusy: 0
    311311
     
    422422AXColumnCount: 2
    423423AXRowCount: 1
    424 AXARIAColumnCount: -1
    425 AXARIARowCount: -1
     424AXARIAColumnCount: 0
     425AXARIARowCount: 0
    426426AXElementBusy: 0
    427427
     
    544544AXColumnCount: 2
    545545AXRowCount: 1
    546 AXARIAColumnCount: -1
    547 AXARIARowCount: -1
     546AXARIAColumnCount: 0
     547AXARIARowCount: 0
    548548AXElementBusy: 0
    549549
     
    590590AXColumnCount: 2
    591591AXRowCount: 2
    592 AXARIAColumnCount: -1
    593 AXARIARowCount: -1
     592AXARIAColumnCount: 0
     593AXARIARowCount: 0
    594594AXElementBusy: 0
    595595
     
    673673AXColumnCount: 2
    674674AXRowCount: 3
    675 AXARIAColumnCount: -1
    676 AXARIARowCount: -1
     675AXARIAColumnCount: 0
     676AXARIARowCount: 0
    677677AXElementBusy: 0
    678678
     
    721721AXColumnCount: 2
    722722AXRowCount: 3
    723 AXARIAColumnCount: -1
    724 AXARIARowCount: -1
     723AXARIAColumnCount: 0
     724AXARIARowCount: 0
    725725AXElementBusy: 0
    726726
     
    769769AXColumnCount: 2
    770770AXRowCount: 2
    771 AXARIAColumnCount: -1
    772 AXARIARowCount: -1
     771AXARIAColumnCount: 0
     772AXARIARowCount: 0
    773773AXElementBusy: 0
    774774
     
    816816AXColumnCount: 1
    817817AXRowCount: 24
    818 AXARIAColumnCount: -1
    819 AXARIARowCount: -1
     818AXARIAColumnCount: 0
     819AXARIARowCount: 0
    820820AXElementBusy: 0
    821821
     
    885885AXColumnCount: 2
    886886AXRowCount: 2
    887 AXARIAColumnCount: -1
    888 AXARIARowCount: -1
     887AXARIAColumnCount: 0
     888AXARIARowCount: 0
    889889AXElementBusy: 0
    890890
  • trunk/LayoutTests/accessibility/table-with-rules-expected.txt

    r198356 r216009  
    4343AXColumnCount: 2
    4444AXRowCount: 1
    45 AXARIAColumnCount: -1
    46 AXARIARowCount: -1
     45AXARIAColumnCount: 0
     46AXARIARowCount: 0
    4747AXElementBusy: 0
    4848
     
    8585AXColumnCount: 2
    8686AXRowCount: 1
    87 AXARIAColumnCount: -1
    88 AXARIARowCount: -1
     87AXARIAColumnCount: 0
     88AXARIARowCount: 0
    8989AXElementBusy: 0
    9090
     
    127127AXColumnCount: 2
    128128AXRowCount: 1
    129 AXARIAColumnCount: -1
    130 AXARIARowCount: -1
     129AXARIAColumnCount: 0
     130AXARIARowCount: 0
    131131AXElementBusy: 0
    132132
  • trunk/Source/WebCore/ChangeLog

    r216007 r216009  
     12017-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: AccessibilityTable::ariaRowCount() and ariaColumnCount() should not return -1 unless that is the author-provided value
     4        https://bugs.webkit.org/show_bug.cgi?id=171475
     5
     6        Reviewed by Chris Fleizach.
     7
     8        If the author has provided a valid value, return it. Otherwise, return 0.
     9
     10        No new tests needed. Update existing test expectations to reflect the change.
     11
     12        * accessibility/AccessibilityTable.cpp:
     13        (WebCore::AccessibilityTable::ariaColumnCount):
     14        (WebCore::AccessibilityTable::ariaRowCount):
     15
    1162017-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityTable.cpp

    r215988 r216009  
    672672   
    673673    int colCountInt = colCountValue.toInt();
    674     // If only a portion of the columns is present in the DOM at a given moment, this attribute is needed to
    675     // provide an explicit indication of the number of columns in the full table.
    676     if (colCountInt > (int)m_columns.size())
     674    // The ARIA spec states, "Authors must set the value of aria-colcount to an integer equal to the
     675    // number of columns in the full table. If the total number of columns is unknown, authors must
     676    // set the value of aria-colcount to -1 to indicate that the value should not be calculated by
     677    // the user agent." If we have a valid value, make it available to platforms.
     678    if (colCountInt == -1 || colCountInt >= (int)m_columns.size())
    677679        return colCountInt;
    678680   
    679     return -1;
     681    return 0;
    680682}
    681683
     
    685687   
    686688    int rowCountInt = rowCountValue.toInt();
    687     // If only a portion of the rows is present in the DOM at a given moment, this attribute is needed to
    688     // provide an explicit indication of the number of rows in the full table.
    689     if (rowCountInt > (int)m_rows.size())
     689    // The ARIA spec states, "Authors must set the value of aria-rowcount to an integer equal to the
     690    // number of rows in the full table. If the total number of rows is unknown, authors must set
     691    // the value of aria-rowcount to -1 to indicate that the value should not be calculated by the
     692    // user agent." If we have a valid value, make it available to platforms.
     693    if (rowCountInt == -1 || rowCountInt >= (int)m_rows.size())
    690694        return rowCountInt;
    691695   
    692     return -1;
     696    return 0;
    693697}
    694698
Note: See TracChangeset for help on using the changeset viewer.