You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spatial-navigation): focus lost in error modal (#8817)
## Description
The spatial-navigation is unable to focus certain elements of the error
modal when this appears, this PR will fix that
## Specific Changes proposed
Allow the spatial-navigation to focus certain non-component elements in
the error modal
## Requirements Checklist
- [x] Feature implemented / Bug fixed
- [ ] If necessary, more likely in a feature request than a bug fix
- [ ] Change has been verified in an actual browser (Chrome, Firefox,
IE)
- [ ] Unit Tests updated or fixed
- [ ] Docs/guides updated
- [ ] Example created ([starter template on
JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0))
- [ ] Has no DOM changes which impact accessiblilty or trigger warnings
(e.g. Chrome issues tab)
- [ ] Has no changes to JSDoc which cause `npm run docs:api` to error
- [ ] Reviewed by Two Core Contributors
assert.strictEqual(this.spatialNav.focusableComponents[0].el()instanceofElement,true,'el function from modal buttons should return a DOM element');// eslint-disable-line no-undef
589
+
assert.strictEqual(this.spatialNav.focusableComponents[0].getIsFocusable(),true,'getIsFocusable function from modal buttons is always true');
590
+
assert.strictEqual(this.spatialNav.focusableComponents[0].getIsAvailableToBeFocused(),true,'getIsAvailableToBeFocused function from modal buttons is always true');
591
+
assert.strictEqual(this.spatialNav.focusableComponents[0].getIsAvailableToBeFocused(),true,'getIsAvailableToBeFocused function from modal buttons is always true');
592
+
assert.strictEqual(typeofthis.spatialNav.focusableComponents[0].getPositions(),'object','focusableComponents function from modal buttons should return an object');
593
+
});
594
+
595
+
QUnit.test('If component passes the required functions it should be added to focusableComponents',function(assert){
assert.strictEqual(this.spatialNav.focusableComponents.length,1,'focusableComponents array should have 1 component');
613
+
assert.strictEqual(this.spatialNav.focusableComponents[0].name_,'firstComponent','the name of the component in focusableComponents array should be "firstComponent"');
0 commit comments