投稿時間:2023-05-04 13:05:11 RSSフィード2023-05-04 13:00 分まとめ(7件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita 【Vue】×【Go】×【Firebase】ログイン機能の実装例 https://qiita.com/Togo_Yokoyama/items/514423421be9bd587ae1 firebase 2023-05-04 12:14:55
Ruby Rubyタグが付けられた新着投稿 - Qiita wsl2にrubyをインストールして、Jekyllを使えるようにするまで https://qiita.com/orengepy/items/b6de3ae7655ee53cf381 owswslubunturubyjekyll 2023-05-04 12:06:48
AWS AWSタグが付けられた新着投稿 - Qiita TeraTermでEC2にSSHログインできなかった件 https://qiita.com/synsyn/items/a6fc0a09282323f8d5fc teraterm 2023-05-04 12:50:14
golang Goタグが付けられた新着投稿 - Qiita 【Vue】×【Go】×【Firebase】ログイン機能の実装例 https://qiita.com/Togo_Yokoyama/items/514423421be9bd587ae1 firebase 2023-05-04 12:14:55
技術ブログ Developers.IO AWS Pricing Calculator はサードパーティのライセンス料を含めて計算しているか教えてください https://dev.classmethod.jp/articles/tsnote-pricing-calculator-marketplace-ami-thirdparty-licence-include-or-notincluded/ awsmarketplace 2023-05-04 03:08:30
海外TECH DEV Community React Testing Library & Accessibility https://dev.to/steady5063/react-testing-library-accessibility-4fom React Testing Library amp AccessibilityReact testing library is one of if not the most popular testing libraries there is for React With over million weekly downloads and the quick easy setup and usage it s no wonder it s popularity has boomed With this boom comes the question Can we automate accessibility tests with it The answer is yes and lets find out how Accessibility Automation SetupWhen setting up component test cases for accessibility there are essentially two main ways to do it Using Jest the most commonly used testing framework with React we can dive a bit more into them The first way to structure it is by including it as part of the entire components test cases or single describe This would be grouping the tests all together so that accessibility is just a part of the normal test cases for UIdescribe Footer Component gt test Functionality Component has loaded gt test Functionality List number gt test Accessibility check async gt The second way is to treat the accessibility tests as a separate set of tests This would mean making accessibility as its own describe group and putting all the automated tests and regression tests for accessibility underneath it describe Functional Footer Component gt test Functionality Component has loaded gt test Functionality List number gt describe Accessibility Footer Component gt test Axe scan async gt test Expand collapse ARIA gt Accessibility Testing with AxeThe quick and most effective way to bring accessibility testing into your React tests using RTL is to use the open source library axe core Axe core checks for around of accessibility issues and widely used within the industry Setup is quick and relatively painless to get going First download the latest axe core integrationnpm i axe core latestNext in your project bring in the axe core libraryimport as axe from axe core Now in your test spec a test and call it Accessibility check like so test Accessibility check async gt Once the test case is made lets make use of React Testing Libraries functionality Since Axe core requires HTML content to scan against we MUST give it pure HTML We can do this is RTL by using the render function and the container object const container render lt Footer gt Finally we create a results object that runs axe core against the container and we create an assertion that takes the results object and looks to see if there are any issues in the violations array test Accessibility check async gt const container render lt Footer gt const results await axe run container expect results violations length toBe Now we have a quick axe scan of our component up and running Note React Testing Library will not render full on CSS so color contrast will not be tested with the library Accessibility Regression TestsOn top of using axe core we can go beyond just checking generically and write specific regression tests that ensure the accessible functionality of the component or page we created An example of this would be the pressed state of a toggle button being properly set Let s say I have a button that toggles it s state and it uses aria pressed attribute We could write a regression test to check that functionality and ensure it is being properly set in the component There many other types of regression that that can be done to ensure accessible functionality For more information on this please view Automated Accessibility part Regression Tests ConclusionReact Testing Library is wonderful for creating simple and effective automated tests for your react components Ensuring accessibility is apart of those tests only helps to Enforce accessible coding practicesHelp build the importance of ay on your dev teamBuild a culture of accessibility learningShape definition of done for ayThe only question now is when will you start adding accessibility test cases 2023-05-04 03:14:52
IT 週刊アスキー ついについにやってきた! 4年ぶりのクラシックの祭典「ラ・フォル・ジュルネ」 https://weekly.ascii.jp/elem/000/004/135/4135352/ beethoven 2023-05-04 12:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)