Accessibility
Accessibility helpers.
INFO
Every component also has the common methods (key, visible, class, attributes, view…).
SkipLink
skip-link"Skip to main content" link, visible only on keyboard focus.
php
use Cg\ComponentFramework\Component\SkipLink\SkipLink;
SkipLink::make('#main');Constructor:SkipLink::make(string $target, Htmlable|Closure|string $label = '跳至主要內容')
Options
position():start·center·end
All methods (3)
target(string $target)label(Htmlable|Closure|string $label)position(string $position)
VisuallyHidden
visually-hiddenText hidden on screen but read by screen readers.
php
use Cg\ComponentFramework\Component\VisuallyHidden\VisuallyHidden;
VisuallyHidden::make('開啟主選單');Constructor:VisuallyHidden::make(Htmlable|Closure|string $content)
Options
as():span·div·p
All methods (2)
as(string $tag)focusable(bool $condition = true)
Generated from source by scripts/wiki-components/generate.php; every example is rendered as part of the build.