Changeset 165590 in webkit


Ignore:
Timestamp:
Mar 13, 2014 6:58:04 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
https://bugs.webkit.org/show_bug.cgi?id=129779

Patch by Diego Pino Garcia <Diego Pino Garcia> on 2014-03-13
Reviewed by Timothy Hatcher.

Source/WebCore:

  • inspector/InspectorDOMAgent.cpp: Set property "focused".

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

  • inspector/protocol/DOM.json: Add property "focused" to

AccessibilityProperties.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js: Add label "Focused".
  • UserInterface/Models/DOMNode.js: Set property "focused" in

accessibilityProperties.
(WebInspector.DOMNode.prototype.accessibilityProperties): Add row for
property "focused".

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
Refresh value of property "focused" in UI.

LayoutTests:

  • inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:

Updated test.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r165587 r165590  
     12014-03-13  Diego Pino Garcia  <dpino@igalia.com>
     2
     3        Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=129779
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
     9        Updated test.
     10
    1112014-03-13  Daniel Bates  <dabates@apple.com>
    212
  • trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt

    r165430 r165590  
    8686    label:
    8787    role:
     88    focused: false
    8889    ignored: true
    8990    ignoredByDefault: true
     
    124125    role: radio
    125126    checked: true
     127    focused: false
    126128    required: false
    127129
     
    131133    role: radio
    132134    checked: false
     135    focused: false
    133136    required: false
    134137
     
    166169    role: checkbox
    167170    checked: true
     171    focused: false
    168172    required: false
    169173
     
    173177    role: checkbox
    174178    checked: false
     179    focused: false
    175180    required: false
    176181
     
    180185    role:
    181186    disabled: true
     187    focused: false
    182188    readonly: true
    183189    required: false
     
    194200    label:
    195201    role:
     202    focused: false
    196203    readonly: true
    197204    required: false
     
    201208    label:
    202209    role:
     210    focused: false
    203211    readonly: true
    204212    required: false
     
    208216    label:
    209217    role:
     218    focused: false
    210219    invalid: true
    211220    required: false
     
    215224    label:
    216225    role:
     226    focused: false
    217227    invalid: spelling
    218228    required: false
     
    222232    label:
    223233    role:
     234    focused: false
    224235    required: true
    225236
     
    228239    label:
    229240    role:
     241    focused: false
    230242    required: true
    231243
     
    234246    label:
    235247    role:
     248    focused: false
    236249    required: false
    237250
     
    240253    label:
    241254    role: button
     255    focused: false
    242256
    243257<button></button>
     
    245259    label:
    246260    role: button
     261    focused: false
    247262
    248263<div role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
     
    250265    label:
    251266    role:
     267    focused: false
    252268    pressed: false
    253269    required: false
     
    257273    label:
    258274    role:
     275    focused: false
    259276    pressed: false
    260277    required: false
     
    265282    role: button
    266283    disabled: true
     284    focused: false
    267285
    268286<div role="button" tabindex="0"></div>
     
    270288    label:
    271289    role: button
     290    focused: false
    272291
    273292<span aria-hidden="true"></span>
  • trunk/Source/WebCore/ChangeLog

    r165589 r165590  
     12014-03-13  Diego Pino Garcia  <dpino@igalia.com>
     2
     3        Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=129779
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/InspectorDOMAgent.cpp: Set property "focused".
     9        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
     10        * inspector/protocol/DOM.json: Add property "focused" to
     11        AccessibilityProperties.
     12
    1132014-03-12  Jae Hyun Park  <jaepark@webkit.org>
    214
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r165430 r165590  
    14191419    bool expanded = false;
    14201420    bool disabled = false;
     1421    bool focused = false;
    14211422    bool ignored = true;
    14221423    bool ignoredByDefault = false;
     
    14331434    bool supportsPressed = false;
    14341435    bool supportsRequired = false;
     1436    bool supportsFocused = false;
    14351437
    14361438    if (AXObjectCache* axObjectCache = node->document().axObjectCache()) {
     
    14551457                expanded = axObject->isExpanded();
    14561458           
     1459            supportsFocused = toElement(node)->isFocusable();
     1460            if (supportsFocused)
     1461                focused = axObject->isFocused();
     1462
    14571463            ignored = axObject->accessibilityIsIgnored();
    14581464            ignoredByDefault = axObject->accessibilityIsIgnoredByDefault();
     
    14911497        if (supportsExpanded)
    14921498            value->setExpanded(expanded);
     1499        if (supportsFocused)
     1500            value->setFocused(focused);
    14931501        if (ignored)
    14941502            value->setIgnored(ignored);
  • trunk/Source/WebCore/inspector/protocol/DOM.json

    r165430 r165590  
    6464                { "name": "exists", "type": "boolean", "description": "Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values." },
    6565                { "name": "expanded", "type": "boolean", "optional": true, "description": "Expanded state." },
     66                { "name": "focused", "type": "boolean", "optional": true, "description": "Focused state. Only defined on focusable elements." },
    6667                { "name": "ignored", "type": "boolean", "optional": true, "description": "Indicates whether the accessibility of the associated AX object node is ignored, whether heuristically or explicitly." },
    6768                { "name": "ignoredByDefault", "type": "boolean", "optional": true, "description": "State indicating whether the accessibility of the associated AX object node is ignored by default for node type." },
  • trunk/Source/WebInspectorUI/ChangeLog

    r165584 r165590  
     12014-03-13  Diego Pino Garcia  <dpino@igalia.com>
     2
     3        Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
     4        https://bugs.webkit.org/show_bug.cgi?id=129779
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * Localizations/en.lproj/localizedStrings.js: Add label "Focused".
     9        * UserInterface/Models/DOMNode.js: Set property "focused" in
     10        accessibilityProperties.
     11        (WebInspector.DOMNode.prototype.accessibilityProperties): Add row for
     12        property "focused".
     13        * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
     14        (WebInspector.DOMNodeDetailsSidebarPanel):
     15        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
     16        Refresh value of property "focused" in UI.
     17
    1182014-03-13  Joseph Pecoraro  <pecoraro@apple.com>
    219
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r165430 r165590  
    178178localizedStrings["Event Listeners"] = "Event Listeners";
    179179localizedStrings["Expand columns"] = "Expand columns";
     180localizedStrings["Expanded"] = "Expanded";
    180181localizedStrings["Expires"] = "Expires";
    181182localizedStrings["Expression"] = "Expression";
    182 localizedStrings["Expanded"] = "Expanded";
    183183localizedStrings["Extension Scripts"] = "Extension Scripts";
    184184localizedStrings["Extra Scripts"] = "Extra Scripts";
     
    190190localizedStrings["Filter Search Results"] = "Filter Search Results";
    191191localizedStrings["Flows"] = "Flows";
     192localizedStrings["Focused"] = "Focused";
    192193localizedStrings["Font"] = "Font";
    193194localizedStrings["Fonts"] = "Fonts";
  • trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js

    r165430 r165590  
    452452                    exists: accessibilityProperties.exists,
    453453                    expanded: accessibilityProperties.expanded,
     454                    focused: accessibilityProperties.focused,
    454455                    ignored: accessibilityProperties.ignored,
    455456                    ignoredByDefault: accessibilityProperties.ignoredByDefault,
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js

    r165517 r165590  
    6262        this._accessibilityNodeDisabledRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Disabled"));
    6363        this._accessibilityNodeExpandedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Expanded"));
     64        this._accessibilityNodeFocusedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Focused"));
    6465        this._accessibilityNodeIgnoredRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Ignored"));
    6566        this._accessibilityNodeInvalidRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Invalid"));
     
    291292                var disabled = booleanValueToLocalizedStringIfTrue("disabled");
    292293                var expanded = booleanValueToLocalizedStringIfPropertyDefined("expanded");
     294                var focused = booleanValueToLocalizedStringIfPropertyDefined("focused");
    293295               
    294296                var ignored = "";
     
    328330                this._accessibilityNodeDisabledRow.value = disabled;
    329331                this._accessibilityNodeExpandedRow.value = expanded;
     332                this._accessibilityNodeFocusedRow.value = focused;
    330333                this._accessibilityNodeIgnoredRow.value = ignored;
    331334                this._accessibilityNodeInvalidRow.value = invalid;
     
    340343                this._accessibilityGroup.rows = [
    341344                    // Global properties for all elements.
     345                    this._accessibilityNodeFocusedRow,
    342346                    this._accessibilityNodeIgnoredRow,
    343347                    this._accessibilityNodeRoleRow,
Note: See TracChangeset for help on using the changeset viewer.