markdowndocs 0.11.0 → 0.11.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4066fc2cf3c03c9f743aaaab41c62611b5206ef9d0dad6cdead66c02f39eba29
4
- data.tar.gz: 9594a84833fca33b4ec4d4a6c81efd1cc21d28e57fddca30f1f4765073ced9bb
3
+ metadata.gz: eb123f5ef96df8917be85966728453e124ae2f418acb7458a583c3d42254b068
4
+ data.tar.gz: e672f4cf03ee6a4fbb37a5cd2d924be8fb903256de7834adf36bfcf4e8877541
5
5
  SHA512:
6
- metadata.gz: 82e59acd421e1b32d0739167035ec770049ac0d27e1e5f00e7f3a9df5a01df00a7419be05443f9ae1ac45110eba1ad23fc0ccc73daf5c56388b2d1d867676d2e
7
- data.tar.gz: 96b3a5cefdde9a74e349111f33b7f33106e1587d3e1cbeef911a2cdafb0588d3ba43b0dd7cdb591c88256a4d151ecc44e076a0c87d009121cf200b62ee1f21da
6
+ metadata.gz: 7a7f53ed3821883f3f858b50039a1ca03ba4bbfafdbf9302dedfb9a0c150ab1f25e198c3ca602e13cec493a469135bdc5b0fb28b9157182e1278409136928171
7
+ data.tar.gz: 15f9aa8cda587f9239ec84290d2fb1e3f3d6cf28c9b208b33d6081af842a5ce15eb5dcfa2a131905f41a228a03d19ea1dacd97fb3e80d35aa4a79f722cf4795a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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.1] - 2026-07-13
9
+
10
+ ### Accessibility (follow-up review)
11
+
12
+ - **Caption-less tables get a numbered, localized accessible name.** v0.11.0
13
+ labelled every un-captioned table the hardcoded English `"Table"`, so a
14
+ page of tables was undifferentiated to a screen reader and unlocalized.
15
+ They are now `"Table 1"`, `"Table 2"`, … via the new
16
+ `markdowndocs.table_label` I18n key (`"Table %{number}"`).
17
+
8
18
  ## [0.11.0] - 2026-07-13
9
19
 
10
20
  ### Accessibility
@@ -109,9 +109,16 @@ module Markdowndocs
109
109
  # a static (JS-free) engine fix is worth that small amount of extra tab
110
110
  # travel.
111
111
  def mark_tables_keyboard_accessible(doc)
112
- doc.css("table").each do |table|
112
+ doc.css("table").each_with_index do |table, index|
113
113
  table["tabindex"] = "0"
114
- table["aria-label"] = "Table" unless table.at_css("caption") || table["aria-label"]
114
+ next if table.at_css("caption") || table["aria-label"]
115
+
116
+ # A caption-less table still needs an accessible name for its focus
117
+ # stop — but a page of identically-named "Table" regions is
118
+ # undifferentiated to a screen reader tabbing through. Number them,
119
+ # and route the label through I18n so non-English docs localize it.
120
+ table["aria-label"] = I18n.t("markdowndocs.table_label", number: index + 1,
121
+ default: "Table %{number}")
115
122
  end
116
123
  end
117
124
 
@@ -1,6 +1,7 @@
1
1
  en:
2
2
  markdowndocs:
3
3
  back_to_documentation: "Back to Documentation"
4
+ table_label: "Table %{number}"
4
5
  navigation_sidebar: "Navigation & Related Docs"
5
6
  viewing_mode: "Viewing Mode"
6
7
  select_viewing_mode: "Select documentation viewing mode"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markdowndocs
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdowndocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Chmura