patternfly / patternfly/patternfly-react

Bug - [MenuToggle] - [No way to show a tooltip with a disabled MenuToggle]

未关闭
#12,500 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Stale
主要语言
TypeScript
星标
862
派生
392
平均合并
4 天 8 小时
30 天内合并 PR
9

描述

Describe the problem

Following the aria disabled button with tooltip example, I want to apply the same to the MenuToggle but it has no isAriaDisabled or support to show a tooltip when the MenuToggle is disabled

How do you reproduce the problem?

import { MenuToggle, Tooltip } from '@patternfly/react-core';

export const MenuToggleDisabled: React.FunctionComponent = () => <Tooltip content="spooky"><MenuToggle isDisabled>Disabled</MenuToggle></Tooltip>;

Expected behavior

isAriaDisabled is supported and showing a tooltip works.

Is this issue blocking you?

No, for now we just show a disabled DropdownItem when no menu items are available.

Screenshots
If applicable, add screenshots to help explain the issue.

What is your environment?

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

What is your product and what release date are you targeting?

Cockpit.

Any other information?

None.


Jira Issue: PF-4329

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 MenuToggle 组件开始,将其禁用时的行为与 issue 中链接的 ARIA-disabled 按钮示例进行比较。验证由 Tooltip 包裹的 MenuToggle 重现用例,然后添加对 isAriaDisabled 的支持以及测试,展示已禁用的 MenuToggle 可以显示其 tooltip。

由索引模型根据 Issue 内容生成。

评估

技术栈
react, typescript
领域
accessibility, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。