vue-visually-hidden
GitHub.icon
visually-hiddenコンポーネントのテスト書いてる
React component for screen reader accessibility
React版
Altキーが押されたらテキストを見せる
なんらかのキーを押すと見せるお作法とかあった?
Vue.js v3でテスト書く環境づくりのノウハウなかなか見つからなかった
https://github.com/testing-library/jest-dom/issues/263
getByTextで取得して toBeVisible で確認が良さそう?
https://github.com/testing-library/jest-dom#tobevisible
getByText使いたかったが、v3 ではまだ使えない
https://github.com/testing-library/vue-testing-library/issues/176
screenの使い方がよくわからないわよ
Jest + TypeScript + Vue 3環境で Vue Testing Library(@testing-library/vue) を動かす | フューチャー技術ブログ
How to test for visibility of elements? · Testing Library
Classと内部にエレメントが入ったときにフォーカスするテスト書いてる
書いててあんま意味ないと思ってるけど、ドキュメントみたいな形にしてる
cypress で have.css するやり方もあるらしいわよ
https://github.com/chakra-ui/chakra-ui-vue-next/blob/develop/packages/c-visually-hidden/tests/c-visually-hidden.cy.tsx#L10-L20
#portfolio #vue3