Skip to content

Conversation

@herablog
Copy link
Member

@herablog herablog commented Aug 9, 2023

BreadcrumbのDesign Docを見ていく中で、aria-*の確認できていないなあだったのでテストを追加しました。

パンくずリストのnav要素に aria-label="パンくずリスト"、現在位置には aria-current="page" を付与している

@herablog herablog requested a review from tokimari August 9, 2023 09:25
@herablog herablog self-assigned this Aug 9, 2023
@reg-suit
Copy link

reg-suit bot commented Aug 9, 2023

✨✨ That's perfect, there is no visual difference! ✨✨

Check out the report here.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Visit the preview URL for this PR (updated for commit dfc2d90):

https://ameba-spindle--pr771-test-breadcrumb-82ienvbh.web.app

(expires Fri, 08 Sep 2023 09:33:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e7521619a2dd5c653490c8246e81ec2a5c8f1435

Copy link
Contributor

@tokimari tokimari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

テスト対象が明確になってよいですね 😄 🎉

expect(screen.getByRole('navigation').getAttribute('aria-label')).toEqual(
'パンくずリスト',
);
expect(screen.getByText('Amebaとは').getAttribute('aria-current')).toEqual(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits. Top, Teamのリンクには aria-current が無いこともテストしておきますか??

@@ -0,0 +1,25 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q.

"src/**/*.test.*",
でtestファイルを除外しているのでエラー表示されてしまうのですが、testファイルも対象に含めておきますか??

image

(Button.test.tsxも同様でした)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants