Accessibility/WebAccessibilityAPI: Difference between revisions

Line 1,832: Line 1,832:
===Feedback notifications===
===Feedback notifications===


An accessible element may be notified of any kind of event, including its accessible source property change. In case of notification the browser will fire accessible events and update its cache if necessary. Decision when to notify the browser or not should be based on accessible events model. In other words if the property change in native markup causes an accessible event then same change in accessible source requires it too.
Accessible element may be notified of any kind of event, including about property change when managed by connected source object. When notified the browser may fire accessible events and update its cache if necessary. Decision whether to notify the browser or not should be based on the accessible events model. In other words if a property change in native markup causes accessible event then it's quite likely the event is expected for similar accessible source change.


<pre>
<pre>
Line 1,845: Line 1,845:
::Called when source has been changed to notify the host accessible element about property change. The browser is responsible to fire proper accessible events and update its internal representation.
::Called when source has been changed to notify the host accessible element about property change. The browser is responsible to fire proper accessible events and update its internal representation.
::Parameters
::Parameters
:::prop
:::eventType of DOMString
::::Name of the property like ''role'' or ''state''
::::The event type to fire.
:::value
:::attrs
::::Value describing the event.
::::Attributes describing the event. See [[#Event_types|event types]] for attributes variety.
</code>
</code>


Line 1,867: Line 1,867:
   }
   }
};
};
function onfocus(aEvent) {
  // Change accessible properties when element is focused.
  // The change requires accessible events.
  aEvent.target.accessibleSource = listboxSource;
}
</pre>
</pre>


===Implied semantics===
===Implied semantics===
Confirmed users
1,396

edits