This Wiki page is edited by participants of the HTML Accessibility Task Force. It does not necessarily represent consensus and it may have incorrect information or information that is not supported by other Task Force participants, WAI, or W3C. It may also have some very useful information.

Canvas/Testing

From HTML accessibility task force Wiki
Jump to: navigation, search

drawFocusIfNeeded() =

Testable Statements

Abort if zero subpaths

If the current path has zero subpaths, then abort these steps. [1]

Abort if element not focused

If element is not focused or is not a descendant of the element with whose context the method is associated, then abort these steps. [1]

Abort if element not descendent of element in current context

If element is not focused or is not a descendant of the element with whose context the method is associated, then abort these steps. [1]

Draw focus outline if element has focus

If the user has requested the use of particular focus outlines (e.g. high-contrast focus outlines), or if the element would have a focus outline drawn around it, then draw a focus outline of the appropriate style along the intended path, following platform conventions.

Clip focus outline

The focus outline [snip] should be subject to the clipping region. When the focus area is clipped by the canvas element, only the visual representation of the focus outline is clipped to the clipping region.

Scroll canvas to top of page

If the focus area is not on the screen, then scroll the focus outline into view by aligning it to the top when it receives focus.

Update AAPI

Inform the user of the location given by the path. The full location of the corresponding fallback element is passed to the accessibility API, if supported. User agents may wait until the next time the event loop reaches its "update the rendering" step to inform the user.

TEST: drawFocusIfNeeded() - AAPI test - MANUAL


[1] Refers to processing algorithm for drawFocusIfNeeded()