Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] ElMessageBox confirm button style #8213

Closed
wjw-gavin opened this issue Jun 10, 2022 · 10 comments · Fixed by #8445
Closed

[Feature Request] ElMessageBox confirm button style #8213

wjw-gavin opened this issue Jun 10, 2022 · 10 comments · Fixed by #8445

Comments

@wjw-gavin
Copy link
Contributor

Existing Component

Yes

Component Name

el-message-box

Description

Hello, I learned that this is not a bug, but now the product department does not agree, after opening messagebox that confirm button is the focus state of the display, so I want to know whether to give a popover property to control of focusing on the first focusable item when opening?

#6773
and https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html DOCUMENT NOT FOUND

@weipxiu
Copy link

weipxiu commented Jun 13, 2022

显然,这就是 bug,因为我也遇到了

@wjw-gavin
Copy link
Contributor Author

wjw-gavin commented Jun 13, 2022

显然,这就是 bug,因为我也遇到了

#6773 这里他们说不是一个bug...,只是希望使用者能够控制,是否打开即焦点状态

@tree-lock
Copy link

(other,A 500 error occurred when I created it from here) image

image

so did i, while https://elementui.github.io/issue-generator/#/en-US?repo=element-plus works ok.

@wjw-gavin
Copy link
Contributor Author

Yes, I created this from here. thanks!

@weipxiu
Copy link

weipxiu commented Jun 13, 2022

有找到取消配置项么?

@wjw-gavin
Copy link
Contributor Author

有找到取消配置项么?
没有,暂时用的这个,不会一打开就默认聚焦
image

@YunYouJun
Copy link
Member

This is inherited from element-ui's design, which I think has a11y considerations in it.

I've had discussions with current designers and we think it's possible to remove its active state by default and provide an enhanced attribute autofocus to allow users to actively turn it on.

I'll finish it this week, please wait a while.

@Giwayume
Copy link
Collaborator

Giwayume commented Jun 24, 2022

Could probably move the background color change from :focus to :focus-visible, that way default accessibility is not impacted and no Javascript change is needed.

People who need accessibility features rely on frameworks implementing them by default, because website developers rarely pay attention to it.

@YunYouJun
Copy link
Member

Done. Anyone want to review it?

#8445

@YunYouJun
Copy link
Member

Could probably move the background color change from :focus to :focus-visible, that way default accessibility is not impacted and no Javascript change is needed.

People who need accessibility features rely on frameworks implementing them by default, because website developers rarely pay attention to it.

Yeah, thanks for the suggestion, but I think :focus-visible for outline.

image

So how about we change it through properties autofocus here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants