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

Core: Add tabindex to code blocks #2799

Merged
merged 3 commits into from
Mar 21, 2021

Conversation

RunDevelopment
Copy link
Member

This fixes #2695.

I tested it with all plugins and it works with all of them (almost).

Code blocks with error messages produced by JSONP Highlight and File Highlight do not get a tabindex=0 because of this condition. It's probably acceptable since these error messages are only one line.

This change is also incompatible with the Coy theme, Coy code blocks are not tab-able even with the tabindex added. Coy uses the code element as its block and not the pre element as all other themes do. This causes various problems. Frankly, I consider this as yet another bug related to Coy's special layouting. We should seriously think about changing Coy to fix this.

@github-actions
Copy link

github-actions bot commented Mar 10, 2021

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +34 B (+1.1%).

file master pull size diff % diff
components/prism-core.min.js 3.04 KB 3.08 KB +34 B +1.1%

Generated by 🚫 dangerJS against 0430679

@RunDevelopment RunDevelopment merged commit dbf7051 into PrismJS:master Mar 21, 2021
@RunDevelopment RunDevelopment deleted the issue2695 branch March 21, 2021 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safari doesn't tab to Prism code block
1 participant