Skip to main content

Search and Top Navigation

#7762 closed bug (notabug)

Opened October 04, 2011 03:10PM UTC

Closed October 04, 2011 03:20PM UTC

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…

Attachments (0)
Change History (1)

Changed October 04, 2011 03:20PM UTC by scottgonzalez comment:1

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.