From c0993c93c0dac3d5db2bfd2e73f4ab5af0dee4e1 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Wed, 27 May 2026 20:45:05 +0000 Subject: [PATCH 01/18] Add $alt_text parameter to coverArtThumbnail function to allow non-empty alt text. --- www/util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/util.php b/www/util.php index 84fefe1c..830e2a73 100644 --- a/www/util.php +++ b/www/util.php @@ -2834,7 +2834,7 @@ function check_admin_privileges($db, $userid) { } -function coverArtThumbnail($id, $size, $version, $params = "") { +function coverArtThumbnail($id, $size, $version, $params = "", $alt_text = "") { $thumbnail = "/coverart?id=$id&thumbnail="; $x15 = round($size * 3 / 2); $x2 = $size * 2; @@ -2844,7 +2844,7 @@ function coverArtThumbnail($id, $size, $version, $params = "") { } global $nonce; return "" - ."\"\""; + ."\"$alt_text\""; } // ---------------------------------------------------------------------------- From 243d543ab98c8a78bb8f56d5d45fc56dccaa7b11 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Wed, 27 May 2026 21:03:27 +0000 Subject: [PATCH 02/18] Add alt text to the cover image on viewgame. --- www/viewgame | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/viewgame b/www/viewgame index 48b5fc5e..18190d72 100644 --- a/www/viewgame +++ b/www/viewgame @@ -929,13 +929,14 @@ echo helpWinLink("help-ifid", "IFID"); Date: Wed, 27 May 2026 21:29:39 +0000 Subject: [PATCH 03/18] Add alt text on large version of cover art. (I have not been able to test this--the dev environment takes me to the live site instead of the dev version of this page.) --- www/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/util.php b/www/util.php index 830e2a73..7451f4c1 100644 --- a/www/util.php +++ b/www/util.php @@ -423,7 +423,7 @@ function sendImageLdesc($title, $imageID)
- + Cover art for <?php echo htmlspecialcharx($title) ?>. Date: Sun, 31 May 2026 21:12:00 +0000 Subject: [PATCH 04/18] Add cover_art_description column to games table --- sql/incoming-schema-changes.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/incoming-schema-changes.sql b/sql/incoming-schema-changes.sql index 1658a504..f433fecb 100644 --- a/sql/incoming-schema-changes.sql +++ b/sql/incoming-schema-changes.sql @@ -3,6 +3,12 @@ USE ifdb; -- use this script for pending changes to the production DB schema +ALTER table games + Add column cover_art_description VARCHAR(255) AFTER coverart; + + + + DROP TABLE IF EXISTS `global_settings`; CREATE TABLE `global_settings` ( `setting_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, From 8add9b611ea2e9f7654e0da2353c65d0665ecc36 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Sun, 31 May 2026 21:16:31 +0000 Subject: [PATCH 05/18] Add cover art description field to editgame page --- www/editgame-util.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/editgame-util.php b/www/editgame-util.php index adf4c9be..0d44e1fe 100644 --- a/www/editgame-util.php +++ b/www/editgame-util.php @@ -69,6 +69,10 @@ function init_link_formats($db) . helpWinLink("help-ifid", "What's an IFID?"), null, TypeString], ["Cover Art", "coverart", 0, null, null, TypeImage], + ["Cover Art Description", "cover_art_description", 60, + "Describe what the cover art looks like. " + . "This description will be in the alt text for the image.", + null, TypeString], ["First Publication Date", "published", 15, "Format as dd-Mon-yyyy (example: 12-Jul-2005), or just enter the year if you don't know the exact date", @@ -169,7 +173,7 @@ function loadGameRecord($db, $id) version, license, system, `desc`, genre, language, seriesname, seriesnumber, forgiveness, bafsid, website, editedby, moddate, pagevsn, - coverart, downloadnotes + coverart, cover_art_description, downloadnotes from games where id = ?", [$id]); if (mysql_num_rows($result) == 0) From 410179d619504713eb0e643ac762bba4535b728b Mon Sep 17 00:00:00 2001 From: alice-blue Date: Sun, 31 May 2026 21:17:54 +0000 Subject: [PATCH 06/18] Include cover_art_description when getting the game info --- www/gameinfo.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/gameinfo.php b/www/gameinfo.php index 0081745f..f2568e66 100644 --- a/www/gameinfo.php +++ b/www/gameinfo.php @@ -26,8 +26,8 @@ function getGameInfo($db, $id, $curuser, $requestVersion, &$errMsg, &$errCode) $result = mysqli_execute_query($db, "select title, author, authorExt, published, - version, license, `system`, `desc`, length(coverart) hasart, genre, - language, seriesname, seriesnumber, forgiveness, bafsid, website, + version, license, `system`, `desc`, length(coverart) hasart, cover_art_description, + genre, language, seriesname, seriesnumber, forgiveness, bafsid, website, downloadnotes, editedby, concat(date_format(moddate, '%e %M %Y at %l:%i'), lower(date_format(moddate, '%p'))) as moddate, @@ -209,6 +209,7 @@ function getGameInfo($db, $id, $curuser, $requestVersion, &$errMsg, &$errCode) $language = $rec["language"]; $system = $rec["system"]; $hasart = !is_null($rec["hasart"]); + $cover_art_description = $rec["cover_art_description"]; $genre = $rec["genre"]; $seriesname = $rec["seriesname"]; $seriesnum = $rec["seriesnumber"]; @@ -416,7 +417,7 @@ function getGameInfo($db, $id, $curuser, $requestVersion, &$errMsg, &$errCode) return array($ifids, $title, $author, $authorExt, $pubYear, $pubFull, $license, $system, $desc, $rawDesc, - $hasart, $genre, $seriesname, $seriesnum, + $hasart, $cover_art_description, $genre, $seriesname, $seriesnum, $forgiveness, $bafsid, $version, $language, $languageNameOnly, $website, $links, From b5cb176de631bf6d130580b44f5434ebe961104e Mon Sep 17 00:00:00 2001 From: alice-blue Date: Mon, 1 Jun 2026 15:31:48 +0000 Subject: [PATCH 07/18] Inclue $cover_art_description on the image description page: in the alt text and printed below it for sighted users. --- www/util.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/www/util.php b/www/util.php index 7451f4c1..fcbccaa2 100644 --- a/www/util.php +++ b/www/util.php @@ -382,7 +382,7 @@ function echoStylesheetLink() // -------------------------------------------------------------------------- // send an image description page - this includes the image and the // copyright information -function sendImageLdesc($title, $imageID) +function sendImageLdesc($page_title, $imageID, $game_title, $cover_art_description) { global $copyrightStatList; checkPersistentLogin(); @@ -414,16 +414,24 @@ function sendImageLdesc($title, $imageID) list($username) = mysql_fetch_row($result); } + // Generate the alt text for the full-sized cover art + $large_cover_alt_text = ""; + if ($cover_art_description) { + $large_cover_alt_text = $cover_art_description; + } else { + $large_cover_alt_text = "Cover art for $game_title."; + } + // send the page ?> - <?php echo htmlspecialcharx($title) ?> + <?php echo htmlspecialcharx($page_title) ?>
- Cover art for <?php echo htmlspecialcharx($title) ?>. + <?php echo htmlspecialcharx($large_cover_alt_text) ?>.
"; } + + if ($cover_art_description) { + echo "

Image description$large_cover_alt_text

"; + } else { + echo "

This image has no description. "; + echo "You can add one by editing the game page.

"; + } + echo "
"; ?>
From d80b31e0a4b4c619176c636cef0a26cbcd87a998 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Mon, 1 Jun 2026 15:32:18 +0000 Subject: [PATCH 08/18] Give more detailed instructions on the editgame page. --- www/editgame-util.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/editgame-util.php b/www/editgame-util.php index 0d44e1fe..62d580ae 100644 --- a/www/editgame-util.php +++ b/www/editgame-util.php @@ -70,8 +70,14 @@ function init_link_formats($db) null, TypeString], ["Cover Art", "coverart", 0, null, null, TypeImage], ["Cover Art Description", "cover_art_description", 60, - "Describe what the cover art looks like. " - . "This description will be in the alt text for the image.", + 'Describe what the cover image looks like, so it can be announced by a screen reader.' + . '
Guidelines
    ' + . '
  • Avoid saying "image of," "picture of," and the like. Screen readers already announce it as an image. It\'s okay to use more specific words that convey the medium, for instance, "illustration," "cartoon," or "painting."
  • ' + . '
  • Avoid saying "cover art." IFDB may include that automatically in some places.' + . '
  • Avoid including the title, the author, or other text that is readily available on the game page. If the image shows a subtitle that is not found elsewhere, you could include that. For example, you could write, "Text reads: Lost Pig and Place Underground, by Grunk as told to Admiral Jota."
  • ' + . '
  • End with a period.
  • ' + . '
' + . '', null, TypeString], ["First Publication Date", "published", 15, "Format as dd-Mon-yyyy (example: 12-Jul-2005), or From eee658cba0b056ac840ce5138ccb132bc00f78e0 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Mon, 1 Jun 2026 15:41:45 +0000 Subject: [PATCH 09/18] Add cover_art_description column to games table --- www/viewgame | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/www/viewgame b/www/viewgame index 18190d72..a90f8e2d 100644 --- a/www/viewgame +++ b/www/viewgame @@ -207,7 +207,7 @@ function sendCoverArt() if (isset($_REQUEST['ldesc'])) sendImageLdesc("Cover Art for $title" . ($targVsn ? " (version $targVsn)" : ""), - $imgname); + $imgname, $title, $cover_art_description); // retrieve the image data list($imgdata, $fmt) = fetch_image($imgname, true); @@ -375,7 +375,8 @@ if (!$errMsg) { list($ifids, $title, $author, $authorExt, $pubYear, $pubFull, $license, $system, $desc, $rawDesc, - $hasart, $genre, $seriesname, $seriesnum, + $hasart, $cover_art_description, + $genre, $seriesname, $seriesnum, $forgiveness, $bafsid, $version, $language, $languageNameOnly, $website, $links, @@ -929,7 +930,11 @@ echo helpWinLink("help-ifid", "IFID"); From 0dca1444d42266f53a89a60ab875b989d2d8bfd5 Mon Sep 17 00:00:00 2001 From: alice-blue Date: Wed, 3 Jun 2026 15:01:37 +0000 Subject: [PATCH 10/18] Use text area for cover art description --- www/editgame | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/editgame b/www/editgame index a9ecf49b..42e3eb04 100644 --- a/www/editgame +++ b/www/editgame @@ -1101,6 +1101,12 @@ for ($i = 0 ; $i < count($fields) ; $i++) { "This game has no cover art", "coverart", $curval, 90); + } else if ($colname == "cover_art_description") { + // multiline field for cover art description + echo ""; + } else if ($colname == "desc") { // multiline field for description echo "