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

fix: #24519 make upload action buttons focusable #24604

Merged
merged 1 commit into from
May 30, 2020

Conversation

morenyang
Copy link
Contributor

@morenyang morenyang commented May 30, 2020

[中文版模板 / Chinese template]

close #24519

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Perfermance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#24519

💡 Background and solution

ezgif-3-7a03c8904ad8

📝 Changelog

Language Changelog
🇺🇸 English Fix Upload delete icon cannot be navigate via keyboard.
🇨🇳 Chinese 解决 Upload 删除图标键盘无法导航操作的问题。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 30, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 30, 2020

@morenyang
Copy link
Contributor Author

CI failed with message:

The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/en/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
    
ReferenceError: window is not defined

title={locale.removeFile}
onClick={() => this.handleClose(file)}
tabIndex={0}
/>
Copy link
Member

Choose a reason for hiding this comment

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

包一个 a 或者 button 标签应该就行了,加 tabIndex 是下策。

Copy link
Member

Choose a reason for hiding this comment

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

image

好像也可行。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我一开始也是这么想的,但是怕改结构你们会有什么 concern ,所以就选 tabindex 这种改动比较小的方案

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems you are right, 我选上以后没法删除...

@afc163
Copy link
Member

afc163 commented May 30, 2020

changelog 要从用户角度写,对于这个问题应该是:

  • 解决 Upload 删除图标键盘无法导航操作的问题。
  • Fix Upload delete icon cannot be navigate via keyboard.

我手动先修改了,下次的 PR 可以注意一下。

@afc163 afc163 merged commit 8e20fe6 into ant-design:master May 30, 2020
@zombieJ zombieJ mentioned this pull request May 31, 2020
13 tasks
afc163 added a commit that referenced this pull request May 31, 2020
afc163 added a commit that referenced this pull request May 31, 2020
@morenyang morenyang deleted the upload-action-btn-focusable branch May 31, 2020 03:54
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 this pull request may close these issues.

Upload control remove file button is not keyboard accessible
3 participants