Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WebProfilerBundle] Fix cursor on link that has no href#50376

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:6.3fromPhilETaylor:patch-12
May 22, 2023

Conversation

PhilETaylor
Copy link
Contributor

@PhilETaylorPhilETaylor commentedMay 20, 2023
edited
Loading

QA
Branch?6.3
Bug fix?yes
New feature?no
Deprecations?no
LicenseMIT

Aa link tag with nohref has the wrong cursor icon by default when hovering it. Eg:https://codepen.io/philetaylor/pen/mdzQoxR

Before

before.mov
anotherbefore.mov

After

after.mov

@carsonbotcarsonbot added this to the6.3 milestoneMay 20, 2023
@nicolas-grekasnicolas-grekas changed the title[Web-profiler-bundle] Fix cursor on link that has no href[WebProfilerBundle] Fix cursor on link that has no hrefMay 22, 2023
@nicolas-grekas
Copy link
Member

Won't this break CSP rules?

@PhilETaylor
Copy link
ContributorAuthor

It doesn't appear to.

@nicolas-grekas
Copy link
Member

Thank you@PhilETaylor.

@stof
Copy link
Member

The right markup for this would be a<button type="button"> (with the appropriate CSS to make it look like a textual link). A<a> without href is neither interactive nor focusable, so this would be an accessibility issue.

@nicolas-grekas there is no CSP at all on profiler pages (our toolbar has to avoid CSP issues as it gets injected into the project pages)

nicolas-grekas and PhilETaylor reacted with thumbs up emoji

@PhilETaylor
Copy link
ContributorAuthor

The right markup for this would be a

I did type that out, but deleted it, sorry, was in the car earlier. I guess we need to revert this one, or revert it with a new PR, where would the css go?

@PhilETaylor
Copy link
ContributorAuthor

As a button, with no css, it also doesn't have a pointer.

Screen.Recording.2023-05-22.at.15.06.05.mov

@PhilETaylor
Copy link
ContributorAuthor

Markup:
line <button type="button" data-toggle-selector="#sf-trace-{{ loop.index0 }}">{{ caller.line }}</button> (<button type="button" data-toggle-selector="#sf-context-{{ loop.index0 }}">context</button>):

With new css inprofiler.css.twig

.sf-toggle-button {    background: none!important;    border: none;    padding: 0!important;    color: rgb(29, 78, 216);    cursor: pointer;}

Looks like this - if this is ok I can PR this:

Screen.Recording.2023-05-22.at.15.10.28.mov

ok?

@PhilETaylor
Copy link
ContributorAuthor

converted to a button in PR#50386

@fabpotfabpot mentioned this pull requestMay 22, 2023
nicolas-grekas added a commit that referenced this pull requestMay 23, 2023
This PR was merged into the 6.3 branch.Discussion----------Fix cursor on link that has no href[WebProfilerBundle] Fix cursor on link that has no hreflink to button| Q             | A| ------------- | ---| Branch?       | 6.3| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->Alternative approach for#50376`@stof` `@nicolas`-grekasCommits-------893d299 Convert A link to Button
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.3
Development

Successfully merging this pull request may close these issues.

4 participants
@PhilETaylor@nicolas-grekas@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp