Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve browser focusable tests #97

Merged
merged 34 commits into from
Jan 12, 2016
Merged

Conversation

rodneyrehm
Copy link
Member

Extracted anything concerning tests/focusable/* from #80.

Changes to the focusable test

  • fixing duplicated test element identification
  • fixing <input type="reset"> test
  • fixing tabbing hangs in firefox by providing defined re-entry point
  • fixing tests concerning attribute variations for embedded SVG
  • adding tests for SVG documents embedded through <iframe>, <object> and <embed>
  • adding test for Shadow DOM (concerning tabsequence)
  • adding test for flexbox layout (concerning tabsequence and bug in IE10 and IE11)
  • adding test for tabindex ordering in iOS
  • adding test for image hiding elements from tabsequence in firefox
  • adding test for <form> and <form disabled> (issue in IE)
  • adding results for Opera 34

Changes to data tables structure

  • merging data-tables/focusable.redirect.html into data-tables/focusable.html, thereby adding the T note to explain "focus target forwarding" and "focus encapsulation".
  • moving unused footnotes removal from runtime to build.

Issues with data tables

  • meta.expected.json should know the expected redirection target (e.g. for "fieldset legend")
  • meta.expected.json needs adjustment for * within <embed tabindex="-1"> and * within <object tabindex="-1">
  • focusable.strict.html needs styling for "redirecting" (color, attribute, notes)
  • Shadow DOM elements are shown as inert when they should show their correct focusable state
  • Add notes for browsers that don't support Shadow DOM
  • focusable.strict.html needs improved visualization of the categorical inert in for "SVG document in" [<iframe>, <embed>, <object>] and <iframe> content. (current state is unnecessarily detailed)
  • focusable.strict.html needs to check ally.get.focusTarget for inert elements to match the redirecting state (but ignore "parental redirection")
  • Shadow DOM host elements are identified tabbable or only-tabbable in Chrome and Firefox, but should probably be a new state along the lines of contained Ignoring this until Tabindex Focus Navigation Explainer led somewhere

Issues with results

  • <input> within <form disabled> is inert in IE9-11
  • <div style="display: flex"> is focusable in IE10, IE11
  • <div id="shadow-host-1"> is identified focusable in IE9-11, but it is not
  • <div id="shadow-host-3" tabindex="0"> is identified focusable in IE9-12, but it is tabbable
  • <legend> redirects focus differently in Chrome (first focusable in <fieldset>) and Firefox (next item in document's tab-sequence after <legend>)
  • <object type="image/svg+xml" data="…" height="0"> is identified as focusable in Safari 9 and iOS 9, but is tabbable?! - fishy
  • Image maps are now identified inert or only-tabbable in Firefox - fishy There's definitely something buggy in Firefox

Issues with ally.js functionality

  • all platform.name checks should be replaced by platform.layout to increase "derivative browser" compatibility (such as Opera 34, which uses Blink)
  • ally.get.focusRedirectTarget should identify focus redirections (not encapsulations)
  • ally.get.focusTarget should use ally.get.focusRedirectTarget
  • ally.is.focusRelevant should identify elements with ShadowRoot because they might receive focus and ally.is.focusable should revert that
  • ally.query.tabbable and ally.query.tabsequence need to compensate swallowed elements (Gecko 1116126) This PR is concerned with improving the focus test coverage and immediate issues with inert/focusable/tabbable/redirecting state
  • ally.fix.pointerFocusChildren should also cover <div style="display: flex"> being considered focusable bei IE10 and IE11 While focusing the child of a flexbox-layouted link is a problem, clicking on a div that gets focus is the same as clicking on a scrollable element.
  • ally.query.* should accept <object> and <iframe> context and dive into their contentWindows an attempt at this is started in the branch feature/content-document

@rodneyrehm
Copy link
Member Author

Braindump:


I'm wondering if the following utilities should rather be exposed in the element namespace, considering they're

element/disabled
element/tabindex-value    (utils/tabindex-value)

element/get-document      (utils/get-document)
element/get-window        (utils/get-window)

element/map/find          (utils/image-map)
element/map/get-img       (utils/image-map)
element/img/get-map       (utils/image-map)
element/label/get-control (get/focus-redirect-target)

I'm not sure about the document/window helpers, they might as well go into the get namespace

get/document      (utils/get-document)
get/window        (utils/get-window)

@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch 5 times, most recently from 2cc5c6b to 5530ff7 Compare December 30, 2015 20:30
@rodneyrehm
Copy link
Member Author

The manual browser focus compatibility test has been rewritten from scratch. The following items are left open:

Test anomalies

  • manual tabbing test needs to be done slowly, i.e. give the browser some time to actually collect the data in IE9 (likely because of missing requestAnimationFrame)

False results of previous test infrastructure

  • area[href].upper only focusable in IE10 - IE13
  • iframe and variations are mostly only focusable
  • object[src=svg] and variations are mostly inert in IE
  • map.object area is focusable in Firefox

Data Tables

  • link iframe[src=svg][tabindex=-1] -> file:svg to note 1 and 2
  • move results to image map section
  • quick/strict refer to querying the dom, not the is/ functions
  • mismatch of is/focusable and query/focusableStrict possible!
  • shadow dom hosts are now completely inert, but are inert host
  • Add note (active) and note for elements that become activeElement because of child content (iframe, ShadowDOM, …)
  • verify if <svg> gets host-focus if its content has focus
  • Add note for missing :focus

@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch 2 times, most recently from bac1c35 to d457e66 Compare January 10, 2016 11:14
this is a complete rewrite of the test infrastructure to allow

* running individual element tests asynchronously (fixing issue with Image Maps in Firefox)
* running individual element tests atomically
* collecting document and ShadowHost per element
* collecting tabsequence real focus target (without ancestry)
* collecting the focus ancestry (ShadowDOM, iframe, …) for select elements
* collecting :focus css pseudo class state
* producing an output format that is immediately usable
@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch from d457e66 to 0654e7b Compare January 11, 2016 20:59
@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch from 0654e7b to 0f82d47 Compare January 12, 2016 10:24
@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch 2 times, most recently from 9e13250 to e730e76 Compare January 12, 2016 14:36
@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch from e730e76 to 5efe1d3 Compare January 12, 2016 14:48
@rodneyrehm rodneyrehm force-pushed the improve-browser-focusable-tests branch from 5efe1d3 to ccce088 Compare January 12, 2016 19:01
rodneyrehm added a commit that referenced this pull request Jan 12, 2016
@rodneyrehm rodneyrehm merged commit 6acb0eb into master Jan 12, 2016
@rodneyrehm rodneyrehm removed the ready label Jan 12, 2016
@rodneyrehm rodneyrehm deleted the improve-browser-focusable-tests branch January 12, 2016 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant