From c49293ef1323b457c99898343c2dffdb037945a1 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 20 Nov 2024 09:59:59 -0600 Subject: [PATCH] Add field for image description This helps support accessibility and AI feature extraction for indexing --- lib/cocina/models/presentation.rb | 2 ++ openapi.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/cocina/models/presentation.rb b/lib/cocina/models/presentation.rb index d73060b2..a51bfa0a 100644 --- a/lib/cocina/models/presentation.rb +++ b/lib/cocina/models/presentation.rb @@ -4,6 +4,8 @@ module Cocina module Models # Presentation data for the File. class Presentation < Struct + # Descriptive text about an image. This can be used as alt text or for indexing. This should be 130 characters or fewer as this is best practice for alt text. + attribute? :description, Types::Strict::String # Height in pixels attribute? :height, Types::Strict::Integer # Width in pixels diff --git a/openapi.yml b/openapi.yml index 8b0b39c9..720c0d40 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1434,6 +1434,9 @@ components: type: object additionalProperties: false properties: + description: + description: Descriptive text about an image. This can be used as alt text or for indexing. This should be 130 characters or fewer as this is best practice for alt text. + type: string height: description: Height in pixels type: integer