User-Agent Controlled Component
A User-Agent Controlled Component is an element in the HTML namespace for which all the following are true:
- the element has an implicit role which inherits from
widget
; and - the computed values of the element's
height
andwidth
CSS properties do not depend on content provided by the author; and - the computed values of the element's
height
andwidth
CSS properties do not depend on any CSS property with a cascaded value with "Author" origin.
Examples
Typically, radio buttons or checkboxes are User-Agent controlled, until an author changes their dimensions.
Links and buttons usually aren't, because their (text) content is provided by the author and the width depends on it.
Days in a calendar widget build with an <input type="date">
element are also User-Agent controlled since their content isn't provided by the author and their dimensions do not depend on values provided by the author.
Directly setting the height
or width
CSS properties makes an element not User-Agent controlled. Changing the max-height
or min-width
properties can make it not User-Agent controlled, if the added constraint impacts the computed height
or width
properties (i.e., if the height
would be larger than max-height
and is restricted by it; or if the width
would be smaller than min-width
and is changed by it).