because it is brittle()

in src/rules/avoid-positive-index.js [16:30]


because it is brittle (any focusable elements added to the page without an
explicit \`tabIndex\` value greater than zero will come last in the tab order) and
can easily result in a page which is extremely difficult to navigate, causing
accessibility problems.
`;

export default [{
    msg: 'Avoid positive integer values for `tabIndex`.',
    AX: 'AX_FOCUS_03',
    test(_, props) {
        warnRuleDeprecated('avoid-positive-index', 'tabindex-no-positive');
        const tabIndex = hasProp(props, 'tabIndex');
        return !tabIndex || props.tabIndex <= 0;
    }
}];