Closed Bug 1637076 Opened 5 years ago Closed 4 years ago

Rework accessible/mac classes to abide by new protocol and base/sub class invariants

Categories

(Core :: Disability Access APIs, task, P1)

All
macOS
task

Tracking

()

RESOLVED FIXED
mozilla79

People

(Reporter: morgan, Unassigned)

References

Details

(Whiteboard: [mac2020_1])

(1) We should write a new protocol that our base class and additional (sub) classes will implement. This protocol should define a set of required methods and properties for each accessible type, and a set of optional methods and properties that accessibles may implement as needed to communicate which selectors/attributes/actions, etc they support. This protocol should be named with the convention mozAccessibleProtocol, assuming our base class is still mozAccessible.

(2) Our base class should be the only class to implement NSAccessibilityProtocol from Apple. Subclasses should not talk to Apple directly, rather they should implement methods from mozAccessibleProtocol. Within the NSAccessibilityProtocol methods, mozAccessible will dispatch calls to the appropriate mozAccessibleProtocol methods by role or by class.

(3) Within the base class's accessibilityAttributeNames method, we should make sure we advertise attributes iff their selector is supported, and for each supported selector, we advertise its corresponding attribute. This probably means we'll need to steal the map between attrs/selectors from the test files and do some iteration here. Good thing is attributes should be static for each accessible type, so we won't have to do this very often.

This should maybe be a meta bug with 1-3 being dependent bugs, but I'm not sure exactly what the dependency chart looks like here, so might be better to chop things up as best we can and claim the work as we go...

Depends on: 1641002
Depends on: 1641644
Depends on: 1641654
Depends on: 1641655
Depends on: 1641657
Depends on: 1641659
Depends on: 1641665
Depends on: 1641960
Depends on: 1641984
Depends on: 1642024
Depends on: 1642033

This metabug's project is done.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.