Skip to content
PHP Ecosystem
Explore

HasAccesskey

API reference › HTML Attribute › Global › HasAccesskey

traitUIAwesome\Html\Attribute\Global\HasAccesskey
Sourcesrc/Global/HasAccesskey.php
Used by 4 types

Provides an immutable API for the accesskey attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey.

MethodDescriptionDefined by
accesskey()Sets the accesskey attribute.HasAccesskey
public function accesskey(string|Stringable|UnitEnum|null $value): static

Sets the accesskey attribute.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullAccess key character, or null to remove the attribute.

Returns

static: New instance with the updated accesskey attribute.