Hi there, On Tue, 2012-11-20 at 18:53 +0100, Mateusz Leszko wrote: > Hello folks. > > I was wondering why all accessibility roles in webkit are named > ‘AXRoles’ and why it is always expected to return role name with ‘AX’ > prefix? Isn’t it strict MAC role naming? Some Layout Test for > accessibility are wrong in my opinion. e.g.:
Yes, it's strict Mac role naming, which I think comes from the fact that Mac was the first port supporting accessibility in WebKit. What other ports (like GTK) have done so far is either to provide specific expectations with the right role names for them, under the platform/<platform> directory. It might sound a bit silly to do that, but the fact is that the slightly different name for roles is just the point of the iceberg since there might be more differences between the representation of the a11y hierarchies in different ports: - Some roles might exist in one platform, but not in the other (and direct mapping from one to other not trivial) - The hierarchy itself might be different, so you might find some AX objects in the Mac tree that are not in the GTK tree, for instance (the GTK port "flattens" the hierarchy a lot, such as those bullet characters in <ul>/<ol> lists). Still, in some cases the hierarchy is the same and a direct mapping between roles is possible, so I agree the current situation is not the perfect either. In this regard, what some ports have been doing lately (at least the GTK one, that I know of) is to consider the Mac role names as "kind of the standard WK a11y roles" and map from the platform specific ones to those ones in DRT/WKTR. In any case, I'm CCing some people on this mail that might be able to complete / correct my feedback on this. > “FAIL axElement.role should be AXRole: AXLink. Was AXRole: link.” > > “FAIL axElement.role should be AXRole: AXButton. Was AXRole: push > button.” > > “FAIL axElement.role should be AXRole: AXCheckBox. Was AXRole: check > box.” > > “FAIL axElement.role should be AXRole: AXRadioButton. Was AXRole: > radio button.” > Shouldn’t it be PASS? Why expectation is role with ‘AX’ prefix? Those > are only from MAC port, aren’t they? Yes. This is a clear example where the exposed hierarchy seems to be the same and a direct mapping between one platform's role names and the Mac/WebKit role names would be possible. > I hope you’ll correct me if I’m missing something. Layout tests for a11y has always been a complicated matter precisely due to platform-specific differences, so I'd say your question makes a lot of sense. I hope I have shed some light on it. Thanks, Mario _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev