question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Accordion] Can't select text inside summary

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I can’t select text inside expansion panel summary

Expected Behavior 🤔

I should be able to select text inside expansion panel summary

Steps to Reproduce 🕹

Go here https://material-ui.com/components/expansion-panels/ and try to select text Expansion Panel 1

image

Context 🔦

Improve UX for our users

Your Environment 🌎

Tech Version
Material-UI v4.9.11
React 16.9.0
Browser chrome
TypeScript 3.8.3
etc.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
eps1loncommented, Apr 22, 2020

I just think most texts should be selectable, I’m gonna add this css in our components, thanks

That’s fine. We just try to be as close to the native UI as possible and don’t have the bandwidth to do extensive UX research if button text should actually be text-selectable or not. We have to rely on specialists and as far as I can tell every button(-like) element disables text-selection by default.

But there are obviously use cases where you want to allow it regardless and nobody is saying that these are invalid. Otherwise we wouldn’t have user-select.

1reaction
eps1loncommented, Apr 22, 2020

Thanks for opening this issue. I’m generally a big fan of having as much text-selectable as possible but this does not apply to general audiences.

These are buttons (following WAI-ARIA APG Accordion) which generally do not allow text selection.

You can add user-select: text to these elements but you would need to prevent the click behavior if you detected that the user only selects the text and doesn’t want to select text. But your users may encounter some edge cases where they intend to click but accidentally select.

Can you add some more context why your users expect to be able to select text from button-like elements?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Accordion] Can't select text inside summary · Issue #20700
The issue is present in the latest release. I have searched the issues of this repository and believe that this is not a...
Read more >
can't select text inside accordion
i notice that on this accordion: http://jqueryui.com/demos/accordion/ i can select the text inside the divs.. but on mine doesn't work :\
Read more >
How to align text to center in Accordion Component of ...
I want to make those headings (Accordion 1, Accordion 2) center aligned. But I'm unable to do it. Please help, below is the...
Read more >
Accessible accordions part 2 - using <details> and < ...
The good news is that it works as expected. I can say “click [summary text]” and it toggles the content open and closed...
Read more >
Two Issues Styling the Details Element and How to Solve ...
Though the <summary> section invites interaction, the element's default cursor is a text selection icon rather than the pointing finger you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found