跳到正文
cccskills
免费在 GitHub 公开中文介绍

ui-accessibility

用于检查 IntelliJ 界面及插件的无障碍体验,涵盖键盘操作、焦点顺序、屏幕阅读器标签与动态反馈、对比度、缩放和本地化,并提供验证方法。

原文查看原文说明

Review IntelliJ UI accessibility for keyboard, focus, and labels.

JetBrains/intellij-community星标 20,685(GitHub 20,685 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 检查是否可仅用键盘操作
  • 检查对话框的焦点顺序
  • 检查屏幕阅读器标签和通知
  • 检查界面改动后的无障碍体验

中文介绍

功能

本技能检查 IntelliJ IDE 和插件界面的键盘操作、焦点、屏幕阅读器支持、颜色对比度、缩放和本地化。对于 Swing 和 Kotlin UI DSL,只有默认无障碍信息缺失或不准确时,才建议补充名称、角色、状态、值或变化通知。资料还整理了 Tab 移动顺序、焦点是否被困住、按 Escape 关闭窗口,以及如何让动态搜索结果或错误信息得到通知等检查项。

适用场景

创建、修改或评审 IntelliJ 界面时适用。需要检查对话框或弹出窗口的键盘操作、焦点顺序,或屏幕阅读器读取时是否缺少信息时,可以使用本技能。

使用示例

  • “请检查这个界面能否只用键盘操作。”
  • “请检查 Tab 顺序是否符合界面布局。”
  • “请指出屏幕阅读器名称或动态结果通知的缺失。”

注意事项

资料将屏幕阅读器测试列为条件允许时的验证方法,并举例说明 Windows 上的 NVDA 或 JAWS,以及 macOS 上的 VoiceOver。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好资料以界面评审和验证为主,未说明外部发送或破坏性操作。
安装难易度所需工具和 API 密钥是否少且有说明
A良好NVDA、JAWS 和 VoiceOver 是可行时的验证示例,并非必需前提。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md7.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/ui-accessibility/SKILL.md -->

IntelliJ UI Accessibility

Use this skill when creating, changing, or reviewing UI in an IntelliJ-based IDE, including plugin UI. Do not use it just because a feature has a UI surface if the work is not on the UI itself. It covers accessibility expectations for Swing, Kotlin UI DSL, and other UI stacks, plus review and verification checks for keyboard use, screen readers, focus, labels, dynamic feedback, contrast, scaling, and localization.

Primary References

Follow WCAG 2.2 as the primary accessibility standard.

Swing And Kotlin UI DSL

Accessible context details are relevant only for Swing-based UI, including Kotlin UI DSL.

  • For custom Swing components and custom renderers, provide the correct accessible name, role, state/value, and property-change notifications.
  • Accessible names are often inferred from component text, tooltip text, or JLabel.setLabelFor(). Set or override the accessible name only when the inferred name is absent, ambiguous, or incorrect.
  • Do not include the component role in the accessible name. For complex custom components, combine visible title, subtitle, icon meaning, and other visible parts needed to understand the component.
  • Modify AccessibleContext and its properties only when implicit metadata is missing, insufficient, or incorrect.
  • Prefer direct component.getAccessibleContext().accessibleName = ... / accessibleDescription = ... for assigning one already-known value.
  • Use AccessibleContextUtil when it adds value: copying metadata from another component, combining multiple accessible strings, avoiding duplicate descriptions, setting an accessible parent, or normalizing multiline text for screen readers.
  • Do not add accessibility properties or fire accessibility events preemptively. Rely on Swing/Kotlin UI DSL defaults when names, roles, state, values, focus behavior, and events are already correct; customize them only to fix a concrete guideline violation or missing screen-reader signal.
  • Use accessibleDescription in rare cases for supplementary text that already exists in the UI but is not otherwise read when the related component receives focus, such as comments, banners, hints, warnings, or inline explanations. Do not invent a separate description from scratch or duplicate the visible label/state.
  • Use AccessibleRole.LABEL for plain text content and AccessibleRole.TEXT for editable or selectable text fields/text areas. Use the specific button role that matches behavior: PUSH_BUTTON, RADIO_BUTTON, TOGGLE_BUTTON, or HYPERLINK.
  • Override accessible state when custom state such as checked, selected, expanded, or editable is not exposed correctly. Fire accessible property-change events when state, selection, value, text changes must be announced to assistive technologies.
  • For custom components from scratch, check similar Swing components for which AccessibleAction, AccessibleText, AccessibleSelection, AccessibleValue, or other Accessible* interfaces they implement before choosing interfaces manually.
  • Screen readers automatically announce accessible property changes of the focused component. Use AccessibleAnnouncerUtil.announce() for the most important changes outside the focused component or changes that do not fit existing property-change support.
  • Check AccessibleAnnouncerUtil.isAnnouncingAvailable() when code depends on announcement support.
  • Use ScreenReader.isActive() only for the rare behavior that must differ for screen reader users. By default, the UI should behave the same for all users.

Other UI Stacks

  • For Compose, JCEF, or other non-Swing UI, apply the same accessibility goals with that stack's own semantics, focus, keyboard, and testing mechanisms.

Review Workflow

Check the UI before finishing code changes:

  • Keyboard-only operation works, focus order is predictable, and focus does not get trapped. Only interactive components are keyboard-focusable, and they can be activated with Space or Enter when focused.
  • Tab moves focus to the next focusable component and Shift+Tab moves it to the previous one. This applies for every focusable surface: dialogs, popups, tool windows, and embedded panels.
  • Focus stops follow the visual layout order.
  • Every focus stop shows a focus indicator that is not clipped or overlapped.
  • Escape closes dialogs and popups. From a tool window it returns focus to the editor when that is the expected exit path.
  • Treat anything that redefines traversal as a prompt to verify the cycle. Look for: focusTraversalKeysEnabled = false; a Tab/Shift+Tab key binding or a component that consumes the key; a custom FocusTraversalPolicy.
  • When you find one, walk the cycle and confirm three things: every interactive control is reachable, the order matches the layout, and focus escapes both forward and backward.
  • If Tab currently does something other than move focus, the recommended fix is to move that behavior to a non-traversal key and leave Tab and Shift+Tab for traversal. Keep a Tab override only where it is a platform convention users already expect, such as Tab completing inside an open completion popup, and scope it to that state alone.
  • Non-interactive labels and panels are not focusable unless critical important information would otherwise be unavailable to screen reader users; gate that behavior with ScreenReader.isActive().
  • New popups, modal dialogs, and dynamic content either receive focus or have a keyboard path to reach them. Do not move focus unexpectedly while users interact with lists or dropdowns.
  • Container components such as lists, trees, tables, support the arrow-key navigation between items.
  • Important dynamic feedback, such as validation results, search results, and background task completion, is announced or otherwise reachable.
  • Color is not the only signal; contrast, focus visibility, and font/UI scaling remain usable.
  • User-visible accessibility text is localized through message bundles.
  • The UI adapts to the IDE zoom level.

Verification

  • Walk the UI using only the keyboard.
  • Test with a supported screen reader when practical: NVDA or JAWS on Windows, VoiceOver on macOS.
  • Use UI Inspector to examine accessible names, descriptions, roles, and states. Enable "Show Accessibility Issues" to investigate suspected issues or validate custom UI behavior; it is not normally required for routine verification.
  • When keyboard traversal is in scope, list the focus stops in Tab order and compare that order against the visual layout. Note any key that overrides traversal and what it does instead.
  • In code reviews or final notes, explicitly state what accessibility paths were checked and what remains manual.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

actions

免费有简介

实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。

  • 为 IDE 菜单添加操作
  • 修改操作注册或图标
  • 整理操作名称和说明
JetBrains/intellij-community2.1万2026年10月29日 更新

bazel-test-migration

免费有简介

将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。

  • 将 JPS 测试模块迁移到 Bazel
  • 排查仅在 Bazel 中失败的测试
  • 检查测试依赖和数据配置
JetBrains/intellij-community2.1万2026年10月29日 更新

code-style

免费有简介

按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。

  • 按 IntelliJ 规范编写 Kotlin
  • 审查 Java 代码
  • 检查异常处理和密封类型分支
JetBrains/intellij-community2.1万2026年10月29日 更新

commits

免费有简介

本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。

  • 按项目格式编写带工单号的提交信息
  • 整理测试或文档提交并选择合适标签
  • 按规则修改已有提交信息
JetBrains/intellij-community2.1万2026年10月29日 更新

使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。

  • 比较不同检查器的类型推断
  • 确认代码是否会被判为类型错误
  • 查看多个工具的诊断差异
JetBrains/intellij-community2.1万2026年10月29日 更新

整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。

  • 分离界面绘制与展示器决策
  • 整理界面状态的归属
  • 检查 Effect 键和协程用法
JetBrains/intellij-community2.1万2026年10月29日 更新

查看 JetBrains 的全部技能

报告此技能的问题