January 31st 2017. This release does not contain any functional changes.
- replacing array.prototype.findindex by
ally.util.arrayFindIndex
- PR #154 - adding
dist/esm
which provides the modules compiled to ES5 but exposing them in ES6 modules for simplified use in TypeScript projects - PR #154
January 12th 2017. We're continuing our journey to make accessibility simpler (by advancing our understanding of the "platform"). Version 1.4.0 comes 4 months after the last feature release. We pushed about 50 commits in an effort to understand focus behavior in SVG, update the build systems and upgrade automated testing to modern browser versions.
- Improving utilities for convenient and safe
.focus()
,.blur()
to properly support SVG content - Improving identification of focusable status of SVG content
- Upgrading babel from version 5.x to 6.x, by providing AMD modules via UMD bundles
- Upgrading to eslint from version 2.x to 3.x, switching to (slightly customized) eslint-config-semistandard
- Test coverage remained at ~99%
- The library grew from ~22KB to ~23KB gzipped (~73KB to ~76KB minified)
The following lists show the changes to the library grouped by domain.
- Improving
ally.element.focus
to focus SVG elements in MS Edge - Improving
ally.element.blur
to remove focus from SVG elements in MS Edge and Firefox <51
- fixing
ally.is.validTabindex
to account for wrong-casedtabIndex
attribute on SVG elements in MS Edge 14 - fixing
ally.is.focusRelevant
to understandtabindex
on SVG in Firefox and MS Edge - fixing
ally.is.focusRelevant
to understand<use tabindex="-1">
- fixing
ally.is.focusRelevant
to understand<foreignObject tabindex="-1">
- fixing
ally.is.focusRelevant
to include<svg>
when it is its own browsing context in Firefox - fixing
ally.is.tabbable
to consider SVG content tabbable in Firefox and Internet Explorer - fixing
ally.is.tabbable
to consider SVG elements in browsing contexts in Blink - fixing
ally.is.tabbable
to considertabindex="-1"
on SVG elements in<object>
in Edge - fixing
ally.is.tabbable
to consider<use … tabindex="-1">
tabbable in Chrome - fixing
ally.is.tabbable
to remove iOS version restriction on filter - fixing
ally.is.onlyTabbable
to stop considering SVG elements in IE, Edge and Firefox 51+ - fixing
ally.query.tabsequence
to properly sort SVG elements with tabindex in Edge 14+
- refactoring supports to pass focused element to validation callback
- refactoring supports to properly test support of SVG elements in Trident
- refactoring
ally.style.focusSource
andally.style.focusWithin
to optimizefocusin
orfocus
event name detection - fixing various linting errors after upgrading to eslint 3 and semistandard
- upgrading babel from 5.x to 6.x - issue #51
- upgrading eslint from 2.x to 3.x
- introducing eslint-config-semistandard
- upgrading lint-staged
- upgrading intern to 3.4.2
- upgrading TravisCI to run build and tests on NodeJS 6.1
- adding Managing focus in SVG
- adding various notes to API docs
- Internet Explorer 9, 10, 11
- Edge 13, 14 (15 manually)
- Safari 8, 9, 10 (6.2 and 7.1 were dropped from automated tests)
- Chrome 55
- Firefox 50, 50 with ShadowDOM enabled
- MathML elements may be focusable
- Shadow DOM focus behavior may have changed from v0 to v1
November 15th 2016. Version 1.3.1 was not published properly and nobody noticed. This release is basically version 1.3.1 but with the proper directory published to npm.
November 11th 2016. This release does not contain any functional changes. The release was necessary because platform.js now identifies EdgeHTML (instead of Trident) as a the layout engine of Microsoft Edge and focus detection suffered.
- Updated to platform.js 1.3.3
- Separated Edge 12+ from IE9-11 (Trident)
September 17th 2016. We're continuing our journey to make accessibility simpler. Version 1.3.0 comes 6 months after the last feature release. We pushed about 90 commits in an effort to reduce the bundle's file size, improve startup performance, convert test suites to BDD and add DOM focus utilities.
- Smaller bundle file size
- Removed all polyfills modifying DOM prototypes
- Added utilities for convenient and safe
.focus()
,.blur()
, and obtaining the active element - Test suites converted to BDD style
- ☻ Test coverage remained at ~99%
- ☻ The library shrunk from ~28KB to ~22KB gzipped (~126KB to ~73KB minified) - yes, we dropped 43% by losing the DOMTokenList shim in v1.2.0 and introducing rollupify
The following lists show the changes to the library grouped by domain.
- adding
ally.get.activeElement
- issue #119 - adding
ally.element.blur
- issue #120 - adding
ally.element.focus
- issue #121
- fixing
ally.maintain.tabFocus
to also work with Option Tab in Safari for macOS - issue #146
- fixing
ally.element.disabled
to remove SVG links from the document's tabbing order in Firefox - fixing
ally.is.tabbable
to respectexcept.scrollable
- improving
ally.style.focusSource
by adding.unlock()
- issue #151 - refactoring
ally.when.visibleArea
to always execute the callback asynchronously
- running all supports tests in a batch to limit number of reflows - issue #142
- removing
svgelement.prototype.focus
as this should be covered more elegantly byally.element.focus
- refactoring
element.prototype.matches
toutil/matches-element
- adding rollupify to reduce package overhead in build bundle
- switching to lint-staged for faster linting during git pre-commit
- replacing broken metalsmith-packagejson plugin - issue #149
- refactoring all unit and functional tests to use BDD interface to improve clarity of a test's intent
- simplify running local tests in a non-WebDriver browser
- added Hiding DOM elements
- added Managing focus in animated UI
Intern unit and functional tests have been run for the following browsers, covering 99% of the library's code:
- Internet Explorer 9, 10, 11
- Edge 13
- Safari 6.2, 7.1, 8, 9
- Chrome 47
- Firefox 42, 42 with ShadowDOM enabled
In order to avoid shipping any more temporary code than we already do in the focusable detection code, we'll provide a separate release once we've properly investigated the following behavioral changes:
- Firefox 51 and Edge 14 ship some sort of support for the tabindex attribute on SVG elements
- Chrome 55 seems to have changed keyboard focusability of SVG content within
<object>
elements - SVG
<use>
elements may be focusable depending on the content they reference - MathML elements may be focusable
August 23rd 2016. We're releasing this fix to remove a dependency we've loaded directly off a forked github repository, rather than from npm.
- replacing domtokenlist-shim by
ally.util.toggleClass
- issue #147
August 6th 2016. We're releasing a few fixes that have been hanging in the master branch as a bugfix release to 1.1, because waiting for 1.2 to come together is not an option for everyone.
- fixing
supports/focus-in-hiden-iframe
to avoiddocument.write()
- issue #126 - fixing
ally.maintain.disabled
to not disable ancestorsfilter
elements - fixing
ally.event.shadowFocus
to not accessdocument.body
before it's available - issue #144
March 18th 2016. We're continuing our journey to make accessibility simpler. Version 1.1.0 - the first major update follows 4 months after making ally.js public in November 2015. In this time we've released 5 beta versions and pushed about 330 commits in an effort to increase browser support and fix the myriad of bugs typically encountered in version one of any software.
- We got rid of those pesky console warnings triggered by the library's initial tests.
- We added full support for Internet Explorer 9 and made the library loadable but not executable in IE8 and NodeJS.
- While version 1.0.0 was targeting specific browsers, version 1.1.0 is targeting rendering engines and thereby adding support for blink based Opera and Yandex Browser, as well as WebKit based browsers.
- We've considerably increased compatibility with browser behavior in regard to what's "focusable". The test suite we used in version 1.0.0 was flawed in many ways. A complete rewrite of the browser tests and the subsequent overhaul of the what browsers consider focusable tables now paint a much more accurate picture of what's going on. And all of that is covered by ally.js, as the new tables differences between browsers and ally.js show.
Even though this is a "stability release" a few new features snuck in, most notably:
- The improved
ally.when.key
now supports modifier keys (shift, alt, control, meta) in a simple notation. - With
ally.maintain.tabFocus
we can now trap TAB focus in the tabsequence.
- ☻ We've increased test coverage from ~93% to ~99%
- ☹ The library grew from ~20KB to ~28KB gzipped (~80KB to ~126KB minified) - yes, we grew by 50%
A few numbers explaining the increased file size:
- ~20KB added for ever more tests and logic to identify what's focus-relevant/focusable/tabbable
- ~6KB added by sorting mechanisms for
ally.query.tabsequence
- ~3KB added by domtokenlist
- ~3KB added for improved ShadowDOM support
- ~2KB added for improved keyboard event handling
The following lists show the changes to the library grouped by domain.
- Adding full support for Internet Explorer 9 - issue #71
- Adding full support for Microsoft Edge 12, 13
- Adding full support for Opera 34 (Blink based, behaves like Chrome)
- Adding manual focusable tests for Safari 6 and 8 on OSX
- Dropping manual focusable tests for Safari on iOS 8, keeping Safari on iOS 9
- Dropping manual focusable tests for Mobile Chrome on Android 4.4, keeping Mobile Chrome on Android 5.1
- upgrading css.escape to version 1.5.0 to work around WebKit 149175
- upgrading platform.js to version 1.3.1
- adding domtokenlist-shim for IE9 DOM
classList
and SVGclassList
in IE11
- fixing
ally.fix.pointerFocusChildren
to use focus identity exceptions - issue #103 - fixing
ally.fix.pointerFocusInput
to properly target nested content of<button>
and<label>
elements
- adding
ally.get.focusRedirectTarget
to identify elements focus is forwarded to - adding
ally.is.activeElement
to identify if an element is the activeElement within its context - adding option
includeOnlyTabbable
toally.query.firstTabbable
,ally.query.focusable
,ally.query.tabbable
,ally.query.tabsequence
- issue #100 - changing
ally.is.focusRelevant
andally.is.focusable
to regard<keygen>
and<embed>
focus-relevant but not focusable - issue #82 - changing
ally.is.validArea
to properly handle<area href="…">
vs.<area>
- issue #72 - changing
ally.is.focusRelevant
to properly handle<object type="application/x-shockwave-flash">
in IE9 - Issue #71 - refactoring
ally.is.focusRelevant
to identify all elements that are either focusable, tabbable, only-tabbable or redirect focus - refactoring
ally.query.tabsequence
to extractutil/merge-dom-order
andutil/sort-dom-order
- fixing
ally.is.focusRelevant
to identify Flexbox Layout in IE10 and IE11 - fixing
ally.is.focusRelevant
to consider ShadowDOM host elements - fixing
ally.is.focusRelevant
to properly identify scrollable containers in Internet Explorer - fixing
ally.is.focusRelevant
to consider all<area>
elements focus relevant, moving the focusable to verification toally.is.focusable
- fixing
ally.is.focusRelevant
to properly identify SVG links in IE9 - fixing
ally.is.focusable
,ally.is.tabbable
andally.is.onlyTabbable
to consider the state of the hosting<iframe>
or<object>
element - fixing
ally.is.focusable
to compensate Chrome being able to focus hidden<object>
elements - Blink 586191 - fixing
ally.is.tabbable
to consider<iframe>
elements not tabbable - fixing
ally.is.onlyTabbable
to not consider<object>
elements only tabbable anymore - fixing
ally.is.onlyTabbable
to not require elements to satisfyally.is.visible
- fixing
ally.is.visible
to consider the state of the hosting<iframe>
or<object>
element - fixing
ally.is.disabled
to properly handle<form disabled>
in IE9 - IE11 - fixing
ally.get.focusTarget
to resolve elements redirecting focus to other elements - fixing
ally.query.tabsequence
to return<area>
elements at the correct position - issue #5 - fixing
ally.query.tabsequence
to properly sort within ShadowDOM - issue #6
- adding
ally.maintain.tabFocus
to trap TAB focus in the tabsequence - issue #63 - changing
ally.when.key
to handle modifier keys and respectcontext
andfilter
options - issue #59 - changing
ally.map.keycode
to provide alphanumeric keys and aliasing
- adding
ally.query.shadowHosts
to find elements hostingShadowRoot
s - issue #110 - adding
ally.observe.shadowMutations
to registerMutationObserver
s across nestedShadowRoot
s - issue #110 - fixing
ally.maintain.disabled
to properly handletabindex
attribute changes - fixing
ally.maintain.disabled
to properly disengage within ShadowHosts - issue #107, PR #108 - fixing
ally.maintain.disabled
to properly observe within ShadowHosts - issue #110 - fixing
ally.maintain.disabled
to handle initially disabled elements - issue #123 - fixing
ally.get.parents
to resolve ancestry forSVGElement
in Internet Explorer - fixing
ally.style.focusWithin
to support SVG in IE10 and IE11
- adding
ally/util/get-content-document
to obtain the browsing context of<object>
and<iframe>
elements - adding
ally/util/get-frame-element
to obtain the host element (<object>
or<iframe>
) of browsing context elements - adding
supports/focus-in-hidden-iframe
to identify if content within a hidden iframe is focusable - adding
supports/focus-object-svg-hidden
to identify if a hidden<object>
element is focusable - changing modules to be able to load in non-browser environments - issue #92
- changing user agent sniffing from detecting browser to rendering engine - issue #97
- refactoring
is/is.util.js
to extract image map related functions intoutils/image-map
- refactoring
is/focus-relevant
andis/tabbable
to allow running the identification with execptions viais/focus-relevant.rules
andis/tabbable.rules
, while maintaining module signature - refactoring
console.log()
to go throughutil/logger
- refactoring
selector/focusable
to extractutil/select-in-shadows
- fixing
ally.is.*
to work with other documents (e.g. iframes) - issue #78 - fixing
supports/*
to not raise network errors - issue #68 - fixing
supports/*
to run when required instead of on script load, restore scroll position - issue #60 - fixing
supports/supports-cache
to respect ally.js version change - fixing
supports/focus-label-tabindex
in Chrome 49 - fixing ShadowDOM related unit tests in WebKit
- fixing
SVGElement.prototype.focus
to identify Microsoft Edge 13
Intern unit and functional tests have been run for the following browsers, covering 99% of the library's code:
- Internet Explorer 9, 10, 11
- Edge 13
- Safari 6.2, 7.1, 8, 9
- Chrome 47
- Firefox 42, 42 with ShadowDOM enabled
- renamed
src/util/sort-elements-by-tabindex.js
tosrc/query/tabsequence.sort-tabindex.js
- aligning
package.json
in repository and npm artifact for compatibility with cdnjs
November 18th 2015. We're embarking on a journey to make accessibility simpler. Version 1.0.0 - the official release - of ally.js has been 14 months in the making, but it's only the beginning of a long story - or so I hope.
Making accessibility simpler (for developers) by providing
- providing core functionality (not complete solutions)
- documentation to learn about accessibility requirements
- the basis figure out how specifications need to evolve
- a common ground for the community to collaborate
I've laid the foundation for collaboration. My goals are laid out. Everything is done on github, in the open. Everything is up for discussion. Anyone can join. See contributing to ally.js for more.
Version 1.0.0
is a complete rewrite from the the early 0.0.x
releases, there are no breaking changes, it is a giant breaking change. More than 400 commits have been made since 0.0.7
, resulting in a few changes:
- moving dependencies from bower to npm (in fact, abandoning bower altogether)
- moving source from AMD to ES6 Module Syntax
- unifying API of all functions, see the API docs
- adding ES6 build infrastructure - issue #1
- adding unit tests - issue #2 (>90% coverage!)
- adding
ally.query.firstTabbable
(replacingfocus/first
) to find the first keyboard focusable element in a sub-tree - adding
strategy: 'strict'
option toally.query.focusable
to find elements by filters unavailable toquerySelectorAll()
- i.e. ShadowDOM without the "Shadow Piercing Descendant Combinator", scrollable containers,-webkit-user-modify: read-write
- issue #17, issue #21 ally.query.focusable
no longer considers<html>
and<body>
focusable - issue #31- adding
ally.is.focusRelevant
to identify technically focusable elements (refactored fromally.is.focusable
) - adding
ally.is.onlyTabbable
to identify elements that cannot be focused by script, but by keyboard - adding
ally.element.disabled
(refactored fromfocus/disabled
) - issue #33 - adding
ally.when.key
to observe simple keyboard input - issue #47 - adding
ally.get.insignificantBranches
to find branches not relevant to a given set of elements - issue #32 - adding
ally.maintain.hidden
to hide everything in the DOM that is not relevant to a given set of elements - issue #46 - fixing
ally.is.visible
by removing dimension constraint - issue #14 - fixing
ally.is.focusable
to also identify "edge-cases" - issue #17, issue #20, issue #21
- ally.js is no longer available through bower, other than by downloading the built archive
src/
was ES5 and AMD, it is now ES6. AMD modules are available indist/amd/
- dropping
focus/first
in favor ofally.query.firstTabbable
- dropping
focus/trap
in favor ofally.maintain.disabled
ally.is.validArea
(dom/is-valid-area
) now returnsfalse
for elements that are not<area>
ally.is.validTabindex
(dom/is-valid-tabindex
) now returnsfalse
for elements withouttabindex
attributeally.style.focusSource
has methods.next()
and.repeat()
removed
- renamed
dom/active-elements.js
toget/active-elements.js
- renamed
dom/focus-target.js
toget/focus-target.js
- renamed
dom/is-disabled.js
tois/disabled.js
- renamed
dom/is-focusable.js
tois/focusable.js
- renamed
dom/is-shadowed.js
tois/shadowed.js
- renamed
dom/is-tabbable.js
tois/tabbable.js
- renamed
dom/is-valid-area.js
tois/valid-area.js
- renamed
dom/is-valid-tabindex.js
tois/valid-tabindex.js
- renamed
dom/is-visible.js
tois/visible.js
- renamed
dom/node-array.js
toutil/node-array.js
- renamed
dom/path.js
toget/parents.js
- renamed
dom/query-focusable.js
toquery/focusable.js
- renamed
dom/query-tabbable.js
toquery/tabbable.js
- renamed
dom/query-tabsequence.js
toquery/tabsequence.js
- renamed
dom/shadow-host-ancestors.js
toget/shadow-host-parents.js
- renamed
dom/when-visible.js
towhen/visible-area.js
- renamed
dom/shadow-host.js
toget/shadow-host.js
- renamed
dom/sort-tabindex.js
toutil/sort-elements-by-tabindex.js
- renamed
dom/visible-quotient.js
toutil/visible-area.js
- renamed
event/interaction-type-listener.js
toobserve/interaction-type.js
- renamed
focus/source.js
tostyle/focus-source.js
- renamed
focus/when-visible.js
towhen/focusable.js
- renamed
focus/within.js
tostyle/focus-within.js
- renamed
focus/disable-focus
tomaintain/disabled
- adding
event/shadow-focus
to emit custom event when focus changes within the ShadowDOM - extracted fromfocus/within
- adding
event/interaction-type-listener
to track user input to differentiate keyboard and pointer input - adding
focus/source
to allow styling of:focus
dependent on user input (keyboard, pinter, script) - adding
focus/disable-focus
to render elements inert and remove them from the document's focus navigation sequence - deprecating
focus/trap
, usefocus/disable-focus
instead
- fixing
dom/visible-quotient
to subtract scrollbars from visible space
- adding
dom/when-visible
to execute callback when an element becomes visible - improving
dom/when-visible
to also wait until an element becomes focusable
- adding
dom/visible-quotient
- adding
focus/when-visible
- fixing
fix-browser/pointer-focus-children
to temporarily disable transitions
- adding
fix-browser/pointer-focus-children
- adding
dom/focus-target
to find the first focusable element in an element's ancestry - improving
fix-browser/pointer-focus-parent
for less complexity - improving
fix-browser
by only engaging handlers for affected browsers (yes, user agent sniffing, deal with it) - fixing
dom/is-visible
to look at computed styles, not the element's styles (duh!)
- adding
fix-browser/pointer-focus-input
- adding
dom/active-elements
to identify the actually focsued element and its host elements in ShadowDOM - adding
focus/within
to "polyfill":focus-within
- adding warning to browser support detection when document does not have focus
- adding
supports/supports-cache
to store browser compatibility data - adding
focus/first
to identify and focus the first[autofocus]
or non positive tabindex ([tabindex=1]
) element - adding
dom/query-domsequence
to separate sorting and mutating the list fromdom/query-tabbable
- improving
fix-browser/pointer-focus-parent
for fewer DOM interactions and less code - improving
focus/trap
to allow nothing being focus and re-acquire focus when required - improving
selector/focusable
(thusdom/query-focusable
) by also finding focusable shadowed elements (via>>>
or/deep/
, ShadowDOM) - #11 - fixing
event/active-element
to be dispatched ondocument
rather thandocument.body
- fixing
prototype/svgelement.prototype.focus
to also coverSVGElement.prototype.blur
- fixing linting errors
- initial release "focus"