axe should be aware of input type default of text
See original GitHub issueregarding input type…
If this attribute is not specified, the default type adopted is text.
_from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input_
example markup:
<input ng-repeat="input in inputCtrl" ng-style="{'width': input.css + '%'}" class="input-md _1DEW order-number landing-input-1 sidebar-input-number ng-touched" ng-class="{ 'input-error': $ctrl.showError }" type="input.type" aria-label="Order Number" aria-describedby="loginErrorTooltip" data-test="input-number" placeholder="" ng-required="input.is_required" ng-model="$ctrl.modelObject[input.name]" ng-change="$ctrl.updateLandingForm(input.name, $ctrl.modelObject[input.name])" style="width: 98%;">
(from https://returns.narvar.com/reionline/returns)
Expectation: getRole(document.querySelector('input'))
should return textbox
Actual: getRole(document.querySelector('input'))
returns null
I can tell this is because the above input, has an invalid type of input.type
🤦 but it appears that all browsers treat that invalid type
attribute value as the same as not having it present at all (which defaults to text). I’ve tested this rei page out with safari + vo and inspected a11y trees in the 3 major browsers.
Motivation: 🤷
axe-core version:4.0.2
Browser and Assistive Technology versions
For Tooling issues:
- Node version: XX
- Platform:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Form <input> elements must have labels | Axe Rules
Form elements that should have labels · Text entry fields, e.g. <input type="text"> , <input type="password"> and <textarea> · Radio buttons, <input type="radio"> ......
Read more >will input default to a type of text?
"text" is the default if you don't specify anything (developer.mozilla.org/en/docs/Web/HTML/Element/Input). I'm not sure if there is behaviour defined if you ...
Read more >Axe API Documentation
This section gives a quick description of how to use the axe APIs to analyze web page content and return a JSON object...
Read more >Autocomplete attribute has valid value | ACT Rule | WAI
This rule applies to any HTML input , select and textarea element with an autocomplete attribute value that is neither empty ( ""...
Read more >Create UI axes for plots in apps - MATLAB uiaxes
Thus, you can pass a UIAxes object to most functions that accept an Axes object. ... [0 1] (default) | two-element vector of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@straker , I can take a look at this one !!
Should be an easy fix. Instead of looking at the type attribute as we do now, we should look at the
vNode.props.type
property which is already calculated to respect valid types and default to text