Skip to content

Commit c9074f4

Browse files
author
michael-n-cooper
committed
Generated by TRAVIS-CI 3909695
utils.js: Make isFocusable return false when tabindex is positive and element is disabled (pull#1419) This change potentially effects any example that uses the isFocusable method in the shared utility scripts (examples/js/utils.js). Fixes a bug in isFocusable where it returned true for elements with positive tabindex even when the element is disabled.
1 parent b79c486 commit c9074f4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/js/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ aria.Utils.remove = function (item) {
6464
};
6565

6666
aria.Utils.isFocusable = function (element) {
67-
if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) {
68-
return true;
67+
if (element.tabIndex < 0) {
68+
return false;
6969
}
7070

7171
if (element.disabled) {

index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,16 @@
151151
"aliasOf": "WAI-ARIA-1.1"
152152
}
153153
},
154-
"publishDate": "2020-06-25",
155-
"publishISODate": "2020-06-25T00:00:00.000Z",
156-
"generatedSubtitle": "Editor's Draft 25 June 2020"
154+
"publishDate": "2020-06-30",
155+
"publishISODate": "2020-06-30T00:00:00.000Z",
156+
"generatedSubtitle": "Editor's Draft 30 June 2020"
157157
}</script><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED"></head>
158158
<body class="h-entry informative"><div class="head">
159159
<a class="logo" href="https://www.w3.org/"><img alt="W3C" width="72" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C"></a> <h1 id="title" class="title">WAI-ARIA Authoring Practices 1.2</h1>
160160

161161
<h2>
162162
W3C Editor's Draft
163-
<time class="dt-published" datetime="2020-06-25">25 June 2020</time>
163+
<time class="dt-published" datetime="2020-06-30">30 June 2020</time>
164164
</h2>
165165
<dl>
166166
<dt>This version:</dt><dd>
@@ -6981,7 +6981,7 @@ <h3 id="c-4-enabling-funders"><bdi class="secno">C.4 </bdi>Enabling funders<a cl
69816981

69826982

69836983
</section>
6984-
<script type="text/javascript">(function(){window['__CF$cv$params']={r:'5a91c455bf670cd9',m:'27b844b9617cf7b1b92cf12187d8ac799e3b59a4-1593120387-1800-AWxXwqdtChf39ldZPyrmYHJHw+toad7S5cEvDuY+Bb6VmcfZsuzXk/zs0A49dKjDSgOTV1qGteLsHBEmGUrmA63cT1P/U1zqdFdgzR3ebmWtq1LqPPktJfGjsaKHndALBLh6/eBeIFj8bjXVmOvm5F1mtkBbY/fmgaZeDb16eh30/AUEv4wKsaSQG+XcA+QAfnEMU2qAbwKl5dat4R9FcjY=',s:[0xf1bf3c4c1c,0x7a1dd741e4],}})();</script>
6984+
<script type="text/javascript">(function(){window['__CF$cv$params']={r:'5ab907ec7826f035',m:'421ab6e206e93b1be25622e10b17a5d8d914e6a3-1593532101-1800-ASE4QPxBOEecfKpIPhQOcJn+V7B+n0LWPwF7KqTv/kQmf2aVFZmkMzota58FAxxePccX6mxwNuI1UxNbPZ8IFti+RhHzTxZXiSYBKebLm4sMvSGVkmuZ244AMiZjWCtf07HenIJ9UBD85j7S/uG81ORaGBMCpS7exA6mpqx9Ay8qgdq9pMOEURFDPVf4iH91idpezX0B9BUnPkXdvy4sXu0=',s:[0x47f70c9c22,0x11fd144064],}})();</script>
69856985

69866986
<section id="references" class="appendix"><h2 id="d-references"><bdi class="secno">D. </bdi>References<a class="self-link" aria-label="§" href="#references"></a></h2><section id="informative-references">
69876987
<h3 id="d-1-informative-references"><bdi class="secno">D.1 </bdi>

0 commit comments

Comments
 (0)