Repository navigation
Laravel Truss 1.9: a searchable Focus picker #54
albertoarena
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Truss 1.9 is out. The headline is small and specific: the Focus picker is now searchable.
The Focus control was a native dropdown with one row per table. That is fine on a small schema and unusable on a large one. At a couple of hundred tables it is a long scrolling list whose only search is the browser's prefix jump, so typing
itemnever reachesorder_items, and nothing shows you what matched.Now you type to narrow it. It matches anywhere in the name, highlights the matched span in each row, and announces how many matches are left as you type. It agrees with the toolbar filter, which has always matched substrings.
Reported by Alberto Peripolli (@trippo), from a schema of roughly that size.
What it turned into
Replacing a native control means writing by hand everything the browser was giving you for free: keyboard operation, focus management, the accessible name and role, the announcements. Doing that properly meant auditing the rest of the dashboard, and the rest was worse.
Three things inside the diagram (table names, enum type labels, health markers) already carried a button role, so screen readers announced them as buttons. They did nothing when you pressed Enter or Space, because the only listener on them was
click. There was no Escape handler either, so even with a mouse there was no reliable way to dismiss what they opened.That went out in the same release:
accTitle/accDescr), and the description tracks the view you are actually looking at: table and relationship counts, the active filter, the focused table and its depthChecked by hand with VoiceOver, with axe DevTools in light and dark, at 200 percent zoom, and on a phone.
What it does not claim
Truss is not WCAG conformant and I am not going to say it is. This release closed the specific Level A keyboard and naming failures it found. It did not audit the rest.
Two things are known to still fail. The diagram has no text alternative that carries its content, so someone who cannot see it still cannot read it. And control boundaries measure 1.32:1 in light and 1.87:1 in dark, against the 3:1 that 1.4.11 asks for.
There is also a caveat that applies to any theme-able package, and it is worth saying out loud:
truss.themelets your app set its own colours, so Truss can ship accessible defaults and your instance can still end up inaccessible. Any claim I make covers the shipped defaults and nothing else.Try it
The demo is already running 1.9. Open the Focus picker and type.
Update with
composer update albertoarena/laravel-truss.What is next
An alternative structure view, the same tables as plain HTML, which is what makes the diagram's content available as text. Then a published accessibility statement covering what conforms, what is exempt, and what depends on your own theme.
Structure only, never data.
Feedback welcome
Two things I would genuinely like to hear. How many tables are in your biggest schema? The picker was built for about 200 and I have no idea what the real ceiling looks like. And if you use a screen reader, does the diagram description tell you anything useful? I wrote it from what I thought mattered, which is not the same as knowing.
All reactions