What fresh hell is THIS now? - Patrick Lauke
$form_html.find('.button-close').focus();
event.stopPropagation();
}
});
if (!$(event.target).is('#ajax_lightbox')) {
but he would be able to open a dev tools something on his phone?
Mobile Chrome -> Chrome,
Mobile Safari -> Safari/WebKit (need to enable developer tools in Safari, and remote debugging on the phone)
you’ll then get the DevTools for the content on your phone
initialize: function() { $(document).on('keydown', this.manageFocus, this); } });```
var Overlay = Backbone.View.extend({ initialize: function() { $(document).on('keydown', this.manageFocus, this); } });
ok, so you’d want to change
$(document).on(‘keydown’, this.manageFocus, this);
to
$(document).on(‘keydown’, this.manageFocus.bind(this));
manageFocus: function(event) { if (!this.$el.attr('aria-hidden') && event.keyCode === 9) { var insideOverlay = this.$el.has($(event.target)).length; if (!insideOverlay) { $('a', this.$el).focus(); } } }
!this.$el.attr('aria-hidden’)
is bad, because “false” is truthy. go with
this.$el.attr('aria-hidden’) !== ’true'
instead
var insideOverlay = this.$el.has($(event.target)).length;
will query the sub-tree, where
var insideOverlay = this.el.compareDocumentPosition(event.target) & Node.DOCUMENT_POSITION_CONTAINED_BY
won't
inert
to stuff is more analogous to adding aria-hidden as well
I have a simple html markup when it valid in https://validator.w3.org/nu/ it displays:
"Warning: Element header does not need a role attribute.
<header role = "banner" class = "uai__cabecalho"> "
It is wrong to use the aria attribute?
<main id=“content”>
needs tabindex=“-1”