keyboard/altgr: image alt descriptions
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 3 Jan 2024 22:49:17 +0000 (23:49 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 Jan 2024 17:16:03 +0000 (18:16 +0100)
keyboard/altgr/apl.eng.inc.pl
keyboard/altgr/eurkey.eng.inc.pl
keyboard/altgr/index.inc.plp
keyboard/altgr/macos-abc.eng.inc.pl
keyboard/altgr/macos.eng.inc.pl
keyboard/altgr/msx.eng.inc.pl
keyboard/altgr/spacecadet.eng.inc.pl
keyboard/altgr/ukext.eng.inc.pl
keyboard/altgr/windows.eng.inc.pl

index efae0ba2a747e8cbeb3ff5d500eed30b37dffbfe..6675fc4dfb61ecdac66e32693814d005e87b8d4a 100644 (file)
@@ -113,4 +113,5 @@ $groups->{flag}{ext} = ['extended', 'optional operators not available in all var
                'as found in APLX and Dyalog implementations.',
        ],
        image => 'data/keyboard/thumb/unicomp-apl.jpg',
+       imagealt => 'Alt on a custom keyboard with APL labels',
 }
index 1da4a38dd6713bd2d41ed8f8561e8324391b00f6..0f3046d40f3d263ceb0204ea47b6f9738310cf23 100644 (file)
@@ -291,4 +291,5 @@ my %rows = (
                "An interactive map of EurKEY, the European Keyboard Layout.",
        ],
        image => 'data/keyboard/thumb/eurkeyboard.jpg',
+       imagealt => 'Right alt on the EurKEYboard created by Psy-Q',
 }
index 36b50c3955286e088216f3ff09580f61dad2b0cb..75c2cc382bced54cd0f6ea4061863ae65673099e 100644 (file)
@@ -39,7 +39,10 @@ for my $inc (@incs) {
        print '<figure>';
        printf '<a href="/%s">', $inc =~ s/\.eng$//r;
        if (my $table = eval { Data($inc) }) {
-               printf '<img src="/%s" />', $_ for $table->{image} || ();
+               if (my $img = $table->{image}) {
+                       EscapeHTML $name = $table->{imagealt} // $img =~ m{.*/([^/.]*)};
+                       print qq{<img src="/$img" alt="$name" />};
+               }
                $inc = $table->{title};
        }
        printf '<figcaption>%s</figcaption>', $inc;
index b64330378f7cce8a39a2edaa75281b5848e4ef85..133f84c5edba74433e95077578590bde173a45b9 100644 (file)
@@ -209,4 +209,5 @@ my %rows = (
                "with the Option modifier key.",
        ],
        image => 'data/keyboard/thumb/macbook-gray.jpg',
+       imagealt => 'Option key on a black MacBook',
 }
index 5b211f0e786b506a0903c6e4f100c4ed524fe334..0d0718d24dd6de8234d30b9ca1d5299f0726af14 100644 (file)
@@ -116,4 +116,5 @@ my %rows = (
                "with the Option modifier key.",
        ],
        image => 'data/keyboard/thumb/matias-fk302.jpg',
+       imagealt => 'Option key on a Matias Tactile Pro keyboard with USA keycaps',
 }
index 6ed49a6c3f119f5f91e173de5d3e14ece2dbebdd..d52a38df779f852213c1eb8904af354dbba1a5a5 100644 (file)
@@ -108,4 +108,5 @@ $groups->{flag}{ext} = ['anachrone', 'expected uppercase variants if allowed by
                "with the code modifier key.",
        ],
        image => 'data/keyboard/thumb/msxcode.jpg',
+       imagealt => 'Code key on a Toshiba HX10 with graph labels',
 }
index 614ae4ce124adeda97de6ea7fcf3a7a4a53c9f94..6805d53962c2b8a22d104750f099d80a3ee9bc11 100644 (file)
@@ -107,4 +107,5 @@ my %rows = (
        rows => [3, 0], # greek/front and top
        moderows => '41-4',
        image => 'data/keyboard/thumb/spacecadet.jpg',
+       imagealt => 'Many modifier keys on a traditional Symbolics Space Cadet keyboard',
 }
index 3e3a8ce7dafe5e2b00054f2c689c776f86ec96df..303648c0b80f87b0f053b9d8b749dbef5d222327 100644 (file)
@@ -115,4 +115,5 @@ $rows{']'} = $rows{'#'};
                "with the AltGr modifier key.",
        ],
        image => 'data/keyboard/thumb/chromebook-hp11.jpg',
+       imagealt => 'AltGr key on a HP Chromebook 11 G2',
 }
index 810b692591900839de6fe953587f27bc39db2014..fc2f5d7a25e572e3c5a7363656d2a27529ce1705 100644 (file)
@@ -80,4 +80,5 @@ $groups->{flag}{ext} = ['xkb', 'unofficial extensions added in Linux (Gnome, KDE
                "with the AltGr modifier key.",
        ],
        image => 'data/keyboard/thumb/ku2971b-usint.jpg',
+       imagealt => 'AltGr on a KeyboardCompany KU2971B with USA International keycaps',
 }