Merge pull request #5853 from seve12/severi

Improves accessibility by disabling custom Tab handling
This commit is contained in:
Lauri Ojansivu 2025-08-04 18:12:46 +03:00 committed by GitHub
commit 1341fc6a98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -314,7 +314,8 @@ BlazeComponent.extendComponent({
// Pressing Tab should open the form of the next column, and Maj+Tab go
// in the reverse order
} else if (evt.keyCode === 9) {
evt.preventDefault();
// Prevent custom focus movement on Tab key for accessibility
// evt.preventDefault();
const isReverse = evt.shiftKey;
const list = $(`#js-list-${this.data().listId}`);
const listSelector = '.js-list:not(.js-list-composer)';
@ -414,10 +415,11 @@ BlazeComponent.extendComponent({
// event propagation to prevent the card from submitting (on `Enter`) or
// going on the next column (on `Tab`).
onKeydown(evt, commands) {
if (evt.keyCode === 9 || evt.keyCode === 13) {
evt.stopPropagation();
return commands.KEY_ENTER;
}
// Prevent custom focus movement on Tab key for accessibility
// if (evt.keyCode === 9 || evt.keyCode === 13) {
// evt.stopPropagation();
// return commands.KEY_ENTER;
//}
return null;
},
},