[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1783531644173.jpg (198.92 KB, 1024x1024, img_1783531637233_vzdjpksc.jpg)ImgOps Exif Google Yandex

f3489 No.1915

i stumbled onto a weird trick today for when u want an element to be totally unseen but still interactive. using the
hidden="until-found"
attribute is super handy if u are working w/ search functionality or specific browser behaviors. the tricky part is that standard hiding usually collapses the layout, which ruins ur UI flow. i found that you need a little bit of extra css to force the browser to keep that empty space reserved for the element. w/o it, the rest of ur components just shift around and it looks completely broken . it basically makes the element ghost-like in the layout. i am still trying to figure out the best way to handle the margin properties to make this seamless. has anyone else found a cleaner way to do this without bloating the stylesheet? it feels like a bit of a hacky workaround for modern layouts

link: https://master.dev/blog/how-to-make-an-interactive-element-invisible-but-accessible/

46d16 No.1916

File: 1783532926516.jpg (102.43 KB, 1024x1024, img_1783532910912_i9zlwzhy.jpg)ImgOps Exif Google Yandex

>>1915
i usually just stick to
opacity: 0
and
pointer-events: auto
bc it's a bit more predictable across different browsers. the
until-found
attribute is cool but i worry abt how it handles legacy edge cases in older mobile webviews.
>does this approach affect your accessibility testing at all?



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">