-
Notifications
You must be signed in to change notification settings - Fork 277
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
feat(image-viewer): image-viewer 支持无障 碍模式 #1715
Conversation
预览3 |
src/image-viewer/image-viewer.wxml
Outdated
@@ -22,7 +24,7 @@ | |||
current="{{currentSwiperIndex}}" | |||
bindchange="onSwiperChange" | |||
> | |||
<swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image"> | |||
<swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image" ria-role="img" aria-label="图像"> | |||
<t-image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ria-role="img" aria-label="图像"
为什么是定义在<swiper-item />
上?从代码上看,里面有一个t-image
- 应该是 aria-role 而非 ria-role
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
里面有个t-image有自己的无障碍属性,是不是不用加到上了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“不用加到上”是指什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例中有多张图像,是不是可以通过图像1、图像2...来适当区分
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
焦点穿透问题依旧存在哦
具体什么机型,我测试是通过的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“不用加到上”是指什么?
不用加在 swiper-item上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
具体什么机型,我测试是通过的
iPhone 11 Pro,iOS 16.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用加在 swiper-item上
如果需要加 aria-role=img,从代码看起来应该加在 t-image 上才比较合理
焦点穿透问题依旧存在哦 |
|
预览1 |
预览1 |
预览4 |
@@ -32,12 +34,14 @@ | |||
data-index="{{index}}" | |||
class="{{classPrefix}}__image" | |||
bindload="onImageLoadSuccess" | |||
aria-role="img" | |||
:aria-label="图像{{index}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么需要加冒号?
预览2 |
|
🤔 这个 PR 的性质是?
🔗 相关 Issue
fix #1062
💡 需求背景和解决方案
📝 更新日志
fix(组件名称): 处理问题或特性描述 ...
本条 PR 不需要纳入 Changelog
☑️ 请求合并前的自查清单
andriod设备录屏
https://share.weiyun.com/lCbJwA6F
ios设备录屏
https://share.weiyun.com/ezpL6yyU