{"id":365110,"date":"2022-03-18T10:24:47","date_gmt":"2022-03-18T17:24:47","guid":{"rendered":"https:\/\/css-tricks.com\/?post_type=newsletters&p=365110"},"modified":"2022-03-29T12:20:42","modified_gmt":"2022-03-29T19:20:42","slug":"295-hidden-until-found","status":"publish","type":"newsletters","link":"https:\/\/css-tricks.com\/newsletter\/295-hidden-until-found\/","title":{"rendered":"295: Hidden Until Found"},"content":{"rendered":"\n
[Chris]:<\/strong> Hey hey \u2014 it’s been about a week since we announced the ownership transition of this site to DigitalOcean<\/a>. The outpouring of positivity and support has been overwhelming in the best sort of way. Even my comrades Geoff<\/a> and Robin<\/a> took a moment to write something marking the occasion. 🧡<\/p>\n\n\n\n Reminder!<\/strong> If you’d like to keep getting this newsletter going forward, you have to opt-in<\/strong><\/a> to that. 🙏 <\/p>\n\n\n\n Let’s look at some 🔥 links I’ve been eyeing up this week.<\/p>\n\n\n\n This is just an outstanding idea<\/a> from Zach: make the already very useful With that in place, you get five benefits that are all awesome:<\/p>\n\n\n\n Zach was saying he uses “User Menu button collapsed”<\/p> Once you press the button (technically here the summary element, although the entire elements stays focused), it will announce something like:<\/p> “User Menu button expanded”<\/span><\/p> You can then press TAB (or VO + TAB in Safari) to navigate to the next interactive element, which in this case would be the “Home” link and would be read (in most cases) like, “list with three items. home, link.”<\/p> Technically this works, even if it’s a bit confusing to use with a screen-reader. I expected a disclosure widget andnow I’m in a list with links?<\/p><\/blockquote>\n\n\n\n I’m sure there are plenty of holdouts still, but it’s exceedingly clear that the Block Editor is the future of WordPress. I don’t know if I was an early adopter, but got on board as quick as I could, and have really<\/em> enjoyed this block-based approach to content-building. I admit it was building my own blocks that felt like the best part, despite the fact that it’s a little harder than I might want it to be. Alex Riviere documented his first journey into block building<\/a> and it’s helpful. He found it easier than I did. I’d reach for
\n\n\nBetter Details<\/h3>\n\n\n
<details><\/code> element even more useful! And the implementation is
:chefs-kiss:<\/code>! Just wrap it in a capital W Web Component (and load and instantiate the script). <\/p>\n\n\n\n
<details-utils>\n <details>\u2026<\/details>\n <!-- you can have one or more <details> elements in here -->\n<\/details-utils><\/code><\/pre>\n\n\n\n
esc<\/code> (e.g. like most menus and modals work)<\/li>
class<\/code> (e.g. you can already style the details with
[open]<\/code>, but this is for styling the entire page, like
html.page-menu-is-open<\/code>. Perhaps you want to darken the rest of the page?)<\/li><\/ul>\n\n\n\n
<details><\/code> a lot, even for things like the main navigation on massively popular websites. Which got me thinking about the accessibility of all that. I know for sure that you can’t put anything you want your own semantics with inside the
<summary><\/code> (see Dave’s post<\/a>) (e.g. don’t think you’ll get a proper header out of
<summary><h3>...<\/h3><\/summary><\/code>). But what about interactive elements inside the rest<\/em> of the details area? I was talking to Melanie about that and she launched her own research about it<\/a>. In the end, personally, I’m not that<\/em> worried about. But Melanie did note at least one awkward moment. Like if you use details for a menu, there isn’t a lot of heads up for a screen reader use that they are headed for a list-of-links:<\/p>\n\n\n\n
\n\n\nBlock Party<\/h3>\n\n\n
@wordpress\/scripts<\/a><\/code> for sure<\/em>. <\/p>\n\n\n\n
\n\n\nOlympe mono<\/h3>\n\n\n