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

【无障碍化Android】inputItem type='money'金额编辑框无焦点 #2418

Closed
1 task
liwufu opened this issue Mar 22, 2018 · 1 comment
Closed
1 task
Assignees
Labels

Comments

@liwufu
Copy link

liwufu commented Mar 22, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.8

Environment

Android

Reproduction link

https://mobile.ant.design/kitchen-sink/components/input-item?lang=zh-CN#input-item-demo-0

Steps to reproduce

1、Android开启语音助手
2、单击type='money'的inputItem输入框

What is expected?

用触摸方式和扫动方式,都可聚焦到金额编辑框,并读出控件类型“编辑框”,点击可以响应。

What is actually happening?

金额编辑框没有触摸浏览的焦点,扫动浏览有时候也没有焦点。


type为其他类型的输入框无此问题。
此问题会导致视觉障碍人员无法输入金额。

@ant-design-bot
Copy link

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: ant-design/ant-design#4897

@KgTong KgTong added the bug label May 13, 2018
KgTong added a commit that referenced this issue May 13, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by addging
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 13, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by addging
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 13, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 13, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 14, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 14, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
KgTong added a commit that referenced this issue May 17, 2018
The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418
warmhug pushed a commit that referenced this issue May 18, 2018
…2538)

* Fix(inputitem): add wai-aria suppport for the money type InputItem

The money type InputItem is simulated with the div tag, rather than the origin
input tag. To support wai-aria needs a little more work, for the div tag, by adding
role of `textbox` make div perform like input in aria mode

For the CustomKeyboard, it will lead to wrong focus when not adding aria
supoort for backspace and keyboard canceling

Fixed: #2419, #2418

* Fix(inputitem): remove extra useless custom keyboard instance

In the money type of InputItem, the CustomKeyboard will create as many times as the InputItem is
used.The inner variable `customNumberKeyboard` will point to the latest custom keyboard instance
which can avoid the repeat appearing animation. But when the InputItem is render async, since the
`customNumberKeyboard` points to the latest custom keyboard instance, the operation for previous
custom keyboard instance such as add hidden class  will be invalid

To Solve this problem, remove the useless instances of custom keyboard
everytime one InputItem is being blured

Fixed: #2475
@KgTong KgTong closed this as completed May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants