markdowndocs 0.11.1 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/app/services/markdowndocs/markdown_renderer.rb +16 -0
- data/app/views/markdowndocs/docs/show.html.erb +5 -3
- data/lib/markdowndocs/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee414b6e508ae906b792f1abd65e21135a1439cf740998f69a1ad7cde743f1c1
|
|
4
|
+
data.tar.gz: 55f37cb07e8d2e274ca25fdc73e3448075fb945a7d10e852e596203893643190
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0a49a7d046d2539060dd9bb4cab2f4d9d626c58020a41c898ee8627ae11eb99e2c28a9ff336291acbfd72b3903405e101abac33152fa99e3f0c2a6806d3be00
|
|
7
|
+
data.tar.gz: 8a7ef92900c9e99f9702838b7ab68cc619509c84cace45e1c0f86c94085154e546cc8dd4b94cfc89af9fcbaed6691db4722b556439405320f3fb33ceb00a9db1
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.11.3] - 2026-09-03
|
|
9
|
+
|
|
10
|
+
### Accessibility
|
|
11
|
+
|
|
12
|
+
- **The doc page emits one `main` landmark, not two.** `docs/show` wrapped its
|
|
13
|
+
content column in `<main>`, nesting a second landmark inside the one the host
|
|
14
|
+
layout (or this engine's own, standalone) already provides. axe reports it as
|
|
15
|
+
`landmark-no-duplicate-main` and `landmark-main-is-top-level`, and screen
|
|
16
|
+
readers get two competing "main" destinations on every `/docs/*` page. The
|
|
17
|
+
column is now a `<div>`; the `<article>` inside still carries the content
|
|
18
|
+
semantics.
|
|
19
|
+
|
|
20
|
+
## [0.11.2] - 2026-07-15
|
|
21
|
+
|
|
22
|
+
### Accessibility
|
|
23
|
+
|
|
24
|
+
- **Scrollable code blocks are keyboard-focusable.** Long lines make a `<pre>`
|
|
25
|
+
overflow horizontally via the host's CSS; a scrollable region that isn't
|
|
26
|
+
focusable strands keyboard-only users (WCAG 2.1.1; axe
|
|
27
|
+
`scrollable-region-focusable`). Every rendered code block now carries
|
|
28
|
+
`tabindex="0"`, mirroring the same fix already applied to wide tables in
|
|
29
|
+
0.11.0. No `aria-label` is added — a `<pre>`'s own text is its accessible
|
|
30
|
+
name.
|
|
31
|
+
|
|
8
32
|
## [0.11.1] - 2026-07-13
|
|
9
33
|
|
|
10
34
|
### Accessibility (follow-up review)
|
|
@@ -85,10 +85,26 @@ module Markdowndocs
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
mark_tables_keyboard_accessible(doc)
|
|
88
|
+
mark_code_blocks_keyboard_accessible(doc)
|
|
88
89
|
|
|
89
90
|
doc.to_html
|
|
90
91
|
end
|
|
91
92
|
|
|
93
|
+
# A code block (<pre>) overflows horizontally on long lines and becomes
|
|
94
|
+
# scrollable via the host's CSS, which the engine does not control and
|
|
95
|
+
# cannot inspect at render time — the same keyboard-access gap as wide
|
|
96
|
+
# tables (WCAG 2.1.1; axe `scrollable-region-focusable`). `tabindex="0"`
|
|
97
|
+
# makes each <pre> focusable so a keyboard-only user can scroll it with
|
|
98
|
+
# the arrow keys. Unlike a <table> we add NO aria-label: a <pre>'s own
|
|
99
|
+
# text content is its accessible name, so the focus stop is announced
|
|
100
|
+
# with the code itself; a synthetic "Code block N" label would only add
|
|
101
|
+
# noise. Same trade-off as tables — every code block becomes a tab stop,
|
|
102
|
+
# not only the ones that actually overflow, because scroll state is
|
|
103
|
+
# unknowable without a browser and this is a static (JS-free) fix.
|
|
104
|
+
def mark_code_blocks_keyboard_accessible(doc)
|
|
105
|
+
doc.css("pre").each { |pre| pre["tabindex"] = "0" }
|
|
106
|
+
end
|
|
107
|
+
|
|
92
108
|
# A wide GFM table overflows its column and becomes horizontally
|
|
93
109
|
# scrollable — via the host's typography/prose CSS, which the engine
|
|
94
110
|
# does not control and cannot inspect at render time. A scrollable
|
|
@@ -68,8 +68,10 @@
|
|
|
68
68
|
<!-- Two-column layout -->
|
|
69
69
|
<div class="grid grid-cols-1 gap-8
|
|
70
70
|
lg:grid-cols-12">
|
|
71
|
-
<!-- Main content
|
|
72
|
-
|
|
71
|
+
<!-- Main content. A grid column, not a landmark: the page's `main` is the
|
|
72
|
+
host layout's (or this engine's own, when standalone), and a second
|
|
73
|
+
one nested inside it is a duplicate landmark. -->
|
|
74
|
+
<div class="lg:col-span-8">
|
|
73
75
|
<article
|
|
74
76
|
tabindex="-1"
|
|
75
77
|
autofocus
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
<%= raw @rendered_content %>
|
|
79
81
|
</div>
|
|
80
82
|
</article>
|
|
81
|
-
</
|
|
83
|
+
</div>
|
|
82
84
|
|
|
83
85
|
<!-- Desktop sidebar (hidden on mobile, shown in grid on desktop) -->
|
|
84
86
|
<div class="hidden lg:block lg:col-span-4">
|
data/lib/markdowndocs/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: markdowndocs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dave Chmura
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-09-04 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: rails
|
|
@@ -114,6 +115,7 @@ metadata:
|
|
|
114
115
|
homepage_uri: https://github.com/dschmura/markdowndocs
|
|
115
116
|
source_code_uri: https://github.com/dschmura/markdowndocs
|
|
116
117
|
changelog_uri: https://github.com/dschmura/markdowndocs/blob/main/CHANGELOG.md
|
|
118
|
+
post_install_message:
|
|
117
119
|
rdoc_options: []
|
|
118
120
|
require_paths:
|
|
119
121
|
- lib
|
|
@@ -128,7 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
130
|
- !ruby/object:Gem::Version
|
|
129
131
|
version: '0'
|
|
130
132
|
requirements: []
|
|
131
|
-
rubygems_version: 3.
|
|
133
|
+
rubygems_version: 3.4.19
|
|
134
|
+
signing_key:
|
|
132
135
|
specification_version: 4
|
|
133
136
|
summary: A drop-in markdown documentation site for Rails apps
|
|
134
137
|
test_files: []
|