Skip to content

Commit

Permalink
A11y: make modx-tabs focusable modxcms#16612
Browse files Browse the repository at this point in the history
  • Loading branch information
jenswittmann authored and opengeek committed Sep 23, 2024
1 parent 7e2901c commit 471f332
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
11 changes: 9 additions & 2 deletions _build/templates/default/sass/_a11y.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
.ext-webkit {
#modx-header {
*:focus-visible {

* {

&:focus-visible {
outline: auto !important;
outline-offset: .1em;

&.x-form-focus {
outline: none !important;
}
}
}
}
10 changes: 9 additions & 1 deletion manager/assets/modext/widgets/core/modx.tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ MODx.Tabs = function(config = {}) {
border: false,
autoScroll: true,
autoHeight: true,
cls: 'modx-tabs'
cls: 'modx-tabs',
itemTpl: new Ext.XTemplate(
'<li class="{cls}" id="{id}">',
'<a class="x-tab-strip-close"></a>',
'<a href="#">',
'<span class="x-tab-strip-text">{text}</span>',
'</a>',
'</li>'
)
});
MODx.Tabs.superclass.constructor.call(this, config);
this.config = config;
Expand Down

0 comments on commit 471f332

Please sign in to comment.