diff --git a/openapi.yaml b/openapi.yaml
index 49d6984..4634611 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -2596,8 +2596,8 @@ paths:
tags: [Toolkits]
summary: Update a Toolkit's number and image settings
description: |
- Sets the Toolkit number and whether the thumbnail (on Explore Toolkits) and the cover image (on
- the Toolkit's page) are darkened, as the Create/Edit Collection page does. Only the fields sent
+ Sets the Toolkit number, the cover image's alt text, and whether the thumbnail (on Explore
+ Toolkits) and the cover image (on the Toolkit's page) are darkened, as the Create/Edit Collection page does. Only the fields sent
change. The user must be able to edit the Toolkit: its owner, an editor of its Organisation, or
a user with Marketing or Admin system access.
operationId: updateToolkit
@@ -2613,6 +2613,7 @@ paths:
example:
toolkit_number: "T14"
darken_cover_image: true
+ cover_image_alt: "Volunteers sorting food parcels"
responses:
"200":
description: The Toolkit
@@ -21084,6 +21085,10 @@ components:
type: string
nullable: true
description: The image at the top of the Toolkit's page
+ cover_image_alt:
+ type: string
+ nullable: true
+ description: The cover image's alt text, read out by screen readers; when null, the image is treated as decoration
darken_thumbnail_image:
type: boolean
description: Whether a dark translucent layer covers the thumbnail on Explore Toolkits
@@ -21122,6 +21127,11 @@ components:
toolkit_number:
type: string
nullable: true
+ cover_image_alt:
+ type: string
+ nullable: true
+ maxLength: 255
+ description: The cover image's alt text, as on the Create/Edit Collection page; send null or "" for a decorative image
darken_thumbnail_image:
type: boolean
darken_cover_image:
diff --git a/server.js b/server.js
index b898c4d..a64dc7c 100644
--- a/server.js
+++ b/server.js
@@ -1430,15 +1430,16 @@ function buildDocsPage() {
${endpointCard("GET", "/toolkits/{id}", "Get a Toolkit", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Toolkit ID" }
], [
- { code: "200", cls: "response-2xx", desc: "The Toolkit: toolkit_number, thumbnail_image_url, cover_image_url, darken_thumbnail_image, darken_cover_image and its page url" },
+ { code: "200", cls: "response-2xx", desc: "The Toolkit: toolkit_number, thumbnail_image_url, cover_image_url, cover_image_alt, darken_thumbnail_image, darken_cover_image and its page url" },
{ code: "401", cls: "response-4xx", desc: "Not authenticated" },
{ code: "404", cls: "response-4xx", desc: "Not found, or a Toolkit you can't see" }
])}
- ${endpointCard("PATCH", "/toolkits/{id}", "Change a Toolkit's number and image darkening", true, [
+ ${endpointCard("PATCH", "/toolkits/{id}", "Change a Toolkit's number, cover image alt text and image darkening", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Toolkit ID" },
{ name: "toolkit_number", type: "string", required: false, desc: "The Toolkit's number, e.g. T14; null clears it" },
{ name: "darken_thumbnail_image", type: "boolean", required: false, desc: "Darken the thumbnail on Explore Toolkits" },
- { name: "darken_cover_image", type: "boolean", required: false, desc: "Darken the cover image on the Toolkit's page" }
+ { name: "darken_cover_image", type: "boolean", required: false, desc: "Darken the cover image on the Toolkit's page" },
+ { name: "cover_image_alt", type: "string", required: false, desc: "The cover image's alt text for screen readers, up to 255 characters; null or empty marks the image as decoration" }
], [
{ code: "200", cls: "response-2xx", desc: "The Toolkit" },
{ code: "401", cls: "response-4xx", desc: "Not authenticated" },