Changeset 284796 in webkit
- Timestamp:
- Oct 25, 2021, 10:58:01 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/ios-simulator/labeled-focusable-leaf-nodes-expected.txt (added)
-
LayoutTests/accessibility/ios-simulator/labeled-focusable-leaf-nodes.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r284795 r284796 1 2021-10-25 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Keyboard-focusable leaf nodes with labels should be accessible elements on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=232126 5 6 Reviewed by Andres Gonzalez. 7 8 Add test ensuring focusable leaf nodes with labels are accessible elements on iOS. 9 10 * accessibility/ios-simulator/labeled-focusable-leaf-nodes-expected.txt: Added. 11 * accessibility/ios-simulator/labeled-focusable-leaf-nodes.html: Added. 12 1 13 2021-10-25 Eric Hutchison <ehutchison@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r284793 r284796 1 2021-10-25 Tyler Wilcock <tyler_w@apple.com> 2 3 AX: Keyboard-focusable leaf nodes with labels should be accessible elements on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=232126 5 6 Reviewed by Andres Gonzalez. 7 8 Consider any focusable leaf node that has a label to be an 9 accessible element on iOS. See Google Maps JS API usecase 10 in: https://bugs.webkit.org/show_bug.cgi?id=223492 11 12 Test: accessibility/ios-simulator/keyboard-focusable-leaf-nodes.html 13 14 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 15 (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): 16 Rather than returning false as a fallback, call an element accessible 17 if it focusable, has a label, and is a leaf node (has no accessible 18 children). 19 (-[WebAccessibilityObjectWrapper accessibilityLabel]): 20 Don't compute `axTitle`, `axDescription`, `interactiveDescription`, and 21 `interactiveVideoDescription` until we actually need them (this is 22 a refactor unrelated to the patch title). 23 1 24 2021-10-25 Ziran Sun <zsun@igalia.com> 2 25 -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r283851 r284796 938 938 return true; 939 939 FALLTHROUGH; 940 // All other elements are ignored on the iphone.941 940 case AccessibilityRole::Annotation: 942 941 case AccessibilityRole::Application: … … 984 983 case AccessibilityRole::GrowArea: 985 984 case AccessibilityRole::HelpTag: 986 case AccessibilityRole::Ignored:987 985 case AccessibilityRole::Inline: 988 986 case AccessibilityRole::Insertion: … … 1010 1008 case AccessibilityRole::Paragraph: 1011 1009 case AccessibilityRole::Pre: 1012 case AccessibilityRole::Presentational:1013 1010 case AccessibilityRole::RadioGroup: 1011 case AccessibilityRole::RowGroup: 1014 1012 case AccessibilityRole::RowHeader: 1015 1013 case AccessibilityRole::Row: … … 1047 1045 case AccessibilityRole::TreeGrid: 1048 1046 case AccessibilityRole::Toolbar: 1049 case AccessibilityRole::Unknown:1050 1047 case AccessibilityRole::UserInterfaceTooltip: 1051 1048 case AccessibilityRole::WebApplication: 1052 1049 case AccessibilityRole::WebArea: 1053 1050 case AccessibilityRole::Window: 1054 case AccessibilityRole::RowGroup: 1051 // Consider focusable leaf-nodes with a label to be accessible elements. 1052 // https://bugs.webkit.org/show_bug.cgi?id=223492 1053 return self.axBackingObject->isKeyboardFocusable() 1054 && [self accessibilityElementCount] == 0 1055 && self.axBackingObject->descriptionAttributeValue().stripWhiteSpace().length() > 0; 1056 case AccessibilityRole::Ignored: 1057 case AccessibilityRole::Presentational: 1058 case AccessibilityRole::Unknown: 1055 1059 return false; 1056 1060 } … … 1174 1178 1175 1179 auto* backingObject = self.axBackingObject; 1176 1177 // iOS doesn't distinguish between a title and description field,1178 // so concatentation will yield the best result.1179 NSString *axTitle = backingObject->titleAttributeValue();1180 NSString *axDescription = backingObject->descriptionAttributeValue();1181 NSString *landmarkDescription = [self ariaLandmarkRoleDescription];1182 NSString *interactiveVideoDescription = [self interactiveVideoDescription];1183 1180 1184 1181 // If self is static text inside a heading, the label should be the string … … 1200 1197 } 1201 1198 } 1199 1200 // iOS doesn't distinguish between a title and description field, 1201 // so concatentation will yield the best result. 1202 NSString *axTitle = backingObject->titleAttributeValue(); 1203 NSString *axDescription = backingObject->descriptionAttributeValue(); 1204 NSString *landmarkDescription = [self ariaLandmarkRoleDescription]; 1205 NSString *interactiveVideoDescription = [self interactiveVideoDescription]; 1202 1206 1203 1207 // We should expose the value of the input type date or time through AXValue instead of AXTitle.
Note:
See TracChangeset
for help on using the changeset viewer.