medialize/ally.js

View on GitHub
src/supports/focus-form-disabled.js

Summary

Maintainability
A
0 mins
Test Coverage

// form[tabindex=0][disabled] should be focusable as the
// specification doesn't know the disabled attribute on the form element
// @specification https://www.w3.org/TR/html5/forms.html#the-form-element
export default {
  element: 'form',
  mutate: function(element) {
    element.setAttribute('tabindex', 0);
    element.setAttribute('disabled', 'disabled');
  },
};