Opened 8 years ago

Closed 8 years ago

#7762 closed bug (notabug)

button() adds invalid attribute to buttons, fails to add required attribute

Reported by: chasm Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.button Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

When button() is called, a role="button" attribute is added. In HTML5 this is an invalid attribute. HTML5 requires type="button", but this attribute is missing. See the W3C validator for details:

Attribute role not allowed on element input at this point. …type="submit" value="Submit" role="button" aria-disabled="false"> 

Element button is missing required attribute type. …y" role="button" aria-disabled="false"><span class="ui-button-text">Log out</s…

Change History (1)

comment:1 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

The button plugin doesn't generate buttons, so if you're missing a type, that's from your markup. The role attribute is from ARIA and is perfectly valid. You should not be running js-generated code through a validator.

Note: See TracTickets for help on using tickets.