Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: Source/modules/accessibility/AXNodeObject.h

Issue 1039873002: AX presentation role should be inherited to its required owned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved code to AXNodeObject Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 protected: 51 protected:
52 // Protected data. 52 // Protected data.
53 AccessibilityRole m_ariaRole; 53 AccessibilityRole m_ariaRole;
54 bool m_childrenDirty; 54 bool m_childrenDirty;
55 #if ENABLE(ASSERT) 55 #if ENABLE(ASSERT)
56 bool m_initialized; 56 bool m_initialized;
57 #endif 57 #endif
58 58
59 virtual bool computeAccessibilityIsIgnored() const override; 59 virtual bool computeAccessibilityIsIgnored() const override;
60 virtual bool computeHasInheritedPresentationRole() const override;
60 virtual AccessibilityRole determineAccessibilityRole(); 61 virtual AccessibilityRole determineAccessibilityRole();
61 AccessibilityRole determineAccessibilityRoleUtil(); 62 AccessibilityRole determineAccessibilityRoleUtil();
62 String accessibilityDescriptionForElements(WillBeHeapVector<RawPtrWillBeMemb er<Element>> &elements) const; 63 String accessibilityDescriptionForElements(WillBeHeapVector<RawPtrWillBeMemb er<Element>> &elements) const;
63 void alterSliderValue(bool increase); 64 void alterSliderValue(bool increase);
64 String ariaAccessibilityDescription() const; 65 String ariaAccessibilityDescription() const;
65 String ariaAutoComplete() const; 66 String ariaAutoComplete() const;
66 void ariaLabeledByElements(WillBeHeapVector<RawPtrWillBeMember<Element>>& el ements) const; 67 void ariaLabeledByElements(WillBeHeapVector<RawPtrWillBeMember<Element>>& el ements) const;
67 void changeValueByStep(bool increase); 68 void changeValueByStep(bool increase);
68 AccessibilityRole determineAriaRoleAttribute() const; 69 AccessibilityRole determineAriaRoleAttribute() const;
69 void elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Element>>& el ements, const QualifiedName&) const; 70 void elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Element>>& el ements, const QualifiedName&) const;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 virtual void setFocused(bool) override final; 188 virtual void setFocused(bool) override final;
188 virtual void increment() override final; 189 virtual void increment() override final;
189 virtual void decrement() override final; 190 virtual void decrement() override final;
190 191
191 // Notifications that this object may have changed. 192 // Notifications that this object may have changed.
192 virtual void childrenChanged() override; 193 virtual void childrenChanged() override;
193 virtual void selectionChanged() override final; 194 virtual void selectionChanged() override final;
194 virtual void textChanged() override; 195 virtual void textChanged() override;
195 virtual void updateAccessibilityRole() override final; 196 virtual void updateAccessibilityRole() override final;
196 197
198 bool isPresentationRole(const AXObject*) const;
199
197 private: 200 private:
198 Node* m_node; 201 Node* m_node;
199 202
200 String alternativeTextForWebArea() const; 203 String alternativeTextForWebArea() const;
201 void alternativeText(Vector<AccessibilityText>&) const; 204 void alternativeText(Vector<AccessibilityText>&) const;
202 void ariaLabeledByText(Vector<AccessibilityText>&) const; 205 void ariaLabeledByText(Vector<AccessibilityText>&) const;
203 void changeValueByPercent(float percentChange); 206 void changeValueByPercent(float percentChange);
207 bool isListElement(Node*) const;
208 bool isPresentationRoleInTable(AXObject*) const;
209 bool isRequiredOwnedElement(AXObject*) const;
204 float stepValueForRange() const; 210 float stepValueForRange() const;
205 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; 211 AXObject* findChildWithTagName(const HTMLQualifiedName&) const;
206 }; 212 };
207 213
208 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); 214 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject());
209 215
210 } // namespace blink 216 } // namespace blink
211 217
212 #endif // AXNodeObject_h 218 #endif // AXNodeObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698