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 committed Sep 12, 2024
1 parent 4ab51e3 commit c7cdbc3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
15 changes: 15 additions & 0 deletions _build/templates/default/sass/_a11y.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.ext-webkit {
// #modx-header {
* {

&: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 c7cdbc3

Please sign in to comment.