HasTabindex
API reference › HTML Attribute › Global › HasTabindex
Used by 18 types
UIAwesome\Html\Core\Element\BaseBlockUIAwesome\Html\Form\AbstractInputDateTimeUIAwesome\Html\Form\ButtonUIAwesome\Html\Form\InputCheckboxUIAwesome\Html\Form\InputColorUIAwesome\Html\Form\InputEmailUIAwesome\Html\Form\InputFileUIAwesome\Html\Form\InputImageUIAwesome\Html\Form\InputNumberUIAwesome\Html\Form\InputPasswordUIAwesome\Html\Form\InputRadioUIAwesome\Html\Form\InputRangeUIAwesome\Html\Form\InputResetUIAwesome\Html\Form\InputSearchUIAwesome\Html\Form\InputSubmitUIAwesome\Html\Form\InputTelUIAwesome\Html\Form\InputTextUIAwesome\Html\Form\InputUrl
Provides an immutable API for the tabindex attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
tabIndex() | Sets the tabindex attribute. | HasTabindex |
Method details
Section titled “Method details”tabIndex()
Section titled “tabIndex() ”public function tabIndex(int|string|null $value): staticSets the tabindex attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | int| | Tab order value as an integer or string of ‘-1’ or greater, or null to remove the attribute. |
Returns
static: New instance with the updated tabindex attribute.
Throws
InvalidArgumentException: if the value is not a valid integer or string representation of ‘-1’ or greater.