only focus code blocks if overflow
This commit is contained in:
parent
0c2b484787
commit
ff8f5374b2
|
@ -117,8 +117,10 @@
|
|||
Array.prototype.forEach.call(codeBlocks, function (block) {
|
||||
if (block.querySelector('code')) {
|
||||
block.setAttribute('role', 'region');
|
||||
block.setAttribute('tabindex', '0');
|
||||
block.setAttribute('aria-label', 'code sample');
|
||||
if (block.scrollWidth > block.clientWidth) {
|
||||
block.setAttribute('tabindex', '0');
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -117,8 +117,10 @@
|
|||
Array.prototype.forEach.call(codeBlocks, function (block) {
|
||||
if (block.querySelector('code')) {
|
||||
block.setAttribute('role', 'region');
|
||||
block.setAttribute('tabindex', '0');
|
||||
block.setAttribute('aria-label', 'code sample');
|
||||
if (block.scrollWidth > block.clientWidth) {
|
||||
block.setAttribute('tabindex', '0');
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue
Block a user