As someone who has spent a lot of time trying to gain a11y expertise and learn best practices, this messaging drives me a little bonkers. There is so much inaccessible content on the web. The official ARIA guide tells you "you're better off doing nothing". All of the example patterns in the ARIA Practices Guide (APG) tell you the code isn't for production use [1]. They provide an explanation which points back to..."you're better off doing nothing".
When I need to add a toolbar to my app, and I want it to be accessible. I look at the APG, the APG has a toolbar example with markup, CSS, and JS, but apparently I'm not supposed to use it. I've been at this for years and it's incredibly frustrating. I usually use the APG code in production anyways. It's probably not catastrophically wrong, but it always makes me feel like I'm screwing something up. The alternative is to use a bunch of divs, spans, and buttons because not all of the patterns have semantic HTML equivalents.
[1] https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/layou...