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

Add cursor: pointer; to [role="button"] to fix #371 #379

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ input::-moz-focus-inner {
padding: 0;
}

/**
* Address inconsistency between `button`s and `button`-like widgets.
* Also address iOS Safari element clickability issue.
*/
[role="button"] {
cursor: pointer;
}

/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
Expand Down
10 changes: 10 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -512,4 +512,14 @@ <h3 class="Test-it">should not have spaces between cells</h3>
</table>
</div>

<h2 class="Test-describe"><code>div[role="button"]</code></h2>
<h3 class="Test-it">should have <code>pointer</code> cursor style</h3>
<div class="Test-run">
<div role="button" style="border:1px solid #ADD8E6; width:200px;">div[role="button"]</div>
</div>
<h3 class="Test-it">should be clickable</h3>
<div class="Test-run" onclick="document.getElementById('role-button-clickable').style.backgroundColor = 'green'">
<div id="role-button-clickable" role="button" style="border:1px solid #ADD8E6; width:200px;">div[role="button"]</div>
</div>

</div>