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

Progress component title attribute interferes with tooltip #4929

Closed
1 task done
btangmu opened this issue Nov 25, 2021 · 12 comments · Fixed by #4956
Closed
1 task done

Progress component title attribute interferes with tooltip #4929

btangmu opened this issue Nov 25, 2021 · 12 comments · Fixed by #4956

Comments

@btangmu
Copy link

btangmu commented Nov 25, 2021

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

Version

3.0.0-alpha.9

Environment

macOS big sur; firefox 94.0.2; whatever vue is running at https://www.antdv.com/components/progress/

Reproduction link

https://www.antdv.com/components/progress/

Steps to reproduce

Go to https://www.antdv.com/components/progress/ and look at the demos for "Circular progress bar" and "Progress bar with success segment". Hover on the percentages("75%" and "60%") in the centers of the examples.

What is expected?

For the "Circular progress bar" there should be no useless duplication of "75%" in a pop-up window when you hover. If a progress component itself has its own more explanatory title attribute, that title should be displayed when you hover, not "75%".

For the "Progress bar with success segment" only the intended tooltip should be displayed, implemented by an "a-tooltip" surrounding the "a-progress".

What is actually happening?

"Circular progress bar" shows "75%" in a pop-up (which replaces the intended title if there is one).

"Progress bar with success segment" confusingly shows two popup windows at the same time, but possibly in different locations -- both the intended tooltip that is implemented by an "a-tooltip" surrounding the "a-progress", and the useless "60%".


The use of a-tooltip in combination with a-progress is important but only one example has it -- "Progress bar with success segment" -- so it's not easy to find; tooltip and success segment being two different things. It would be helpful to call more attention to the recommended (?) usage of a-tooltip in combination with a-progress.

Also, a-tooltip is inferior to a "title" attribute in one respect: a-tooltip turns newlines into spaces, while title respects newlines.

@srl295
Copy link
Contributor

srl295 commented Nov 30, 2021

@tangjinzhou can you explain the wontfix?

@srl295
Copy link
Contributor

srl295 commented Nov 30, 2021

@tangjinzhou opened a PR ^

srl295 added a commit to srl295/ant-design-vue that referenced this issue Nov 30, 2021
@tangjinzhou
Copy link
Member

This is a feature, not a bug.
I don't think there's anything wrong with that and could have had better accessibility

@tangjinzhou
Copy link
Member

@srl295

@srl295
Copy link
Contributor

srl295 commented Jan 27, 2022

Hi @tangjinzhou

This is a feature, not a bug.

How is it a feature?

Can you explain the benefit of the "title" attribute?

Or; Is there a better way to make the tooltip work? As @btangmu noted, the current behavior is buggy because we cannot see the tooltip clearly.

Would a screenshot help to show the issue?

I don't think there's anything wrong with that and could have had better accessibility

It won't bring better accessibility because it's the same text that's already accessible.

@srl295
Copy link
Contributor

srl295 commented Jan 27, 2022

And again thank you for ant dv

@tangjinzhou
Copy link
Member

the current behavior is buggy because we cannot see the tooltip clearly

??

image

@srl295
Copy link
Contributor

srl295 commented Jan 27, 2022

@tangjinzhou would you accept a PR to make this behavior selectable?

@tangjinzhou
Copy link
Member

Ok, I will add title prop to config it

tangjinzhou pushed a commit that referenced this issue Jan 28, 2022
@tangjinzhou
Copy link
Member

you can update to 3.0.0-beta.9
If you donot need title, you can set title=''

@srl295
Copy link
Contributor

srl295 commented Jan 28, 2022

you can update to 3.0.0-beta.9
If you donot need title, you can set title=''

fyi @btangmu

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants