DLynch has uploaded a new change for review.
https://gerrit.wikimedia.org/r/297804
Change subject: TabIndexScope: respect aria-hidden
......................................................................
TabIndexScope: respect aria-hidden
Bug: T129792
Bug: T129791
Change-Id: I2a69b3bdb9c507c9734f0ef781464e4029d06980
---
M src/ui/inspectors/ve.ui.FragmentInspector.js
M src/ui/ve.ui.TabIndexScope.js
2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/04/297804/1
diff --git a/src/ui/inspectors/ve.ui.FragmentInspector.js
b/src/ui/inspectors/ve.ui.FragmentInspector.js
index c46d836..fcd9df0 100644
--- a/src/ui/inspectors/ve.ui.FragmentInspector.js
+++ b/src/ui/inspectors/ve.ui.FragmentInspector.js
@@ -111,6 +111,10 @@
this.$content.addClass( 've-ui-fragmentInspector-content' );
this.container.$element.append( this.form.$element, this.$otherActions
);
this.$body.append( this.container.$element );
+
+ this.tabIndexScope = new ve.ui.TabIndexScope( {
+ root: this.$content
+ } );
};
/**
diff --git a/src/ui/ve.ui.TabIndexScope.js b/src/ui/ve.ui.TabIndexScope.js
index 6de9eb0..10d28df 100644
--- a/src/ui/ve.ui.TabIndexScope.js
+++ b/src/ui/ve.ui.TabIndexScope.js
@@ -17,7 +17,8 @@
ve.ui.TabIndexScope = function VeUiTabIndexScope( config ) {
config = $.extend( {
root: false,
- skipAriaDisabled: true
+ skipAriaDisabled: true,
+ skipAriaHidden: true
}, config );
this.skipAriaDisabled = config.skipAriaDisabled;
@@ -65,6 +66,9 @@
if ( self.skipAriaDisabled && this.getAttribute(
'aria-disabled' ) === 'true' ) {
return false;
}
+ if ( self.skipAriaHidden && $( this ).closest(
'[aria-hidden="true"]' ).length ) {
+ return false;
+ }
return OO.ui.isFocusableElement( $( this ) );
} ).map( function ( index ) {
return { element: this, index: index };
--
To view, visit https://gerrit.wikimedia.org/r/297804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a69b3bdb9c507c9734f0ef781464e4029d06980
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits