@@ -113,6 +113,15 @@ export default (() => {
113113 return (
114114 < div class = { classNames ( displayClass , "annotation-viewer" ) } data-pdf-url = { localPdfPath } data-source-url = { pdfUrl } >
115115 < script type = "application/json" id = "annotations-data" dangerouslySetInnerHTML = { { __html : JSON . stringify ( sortedAnnotations ) } } />
116+
117+ { /* SEO: Add semantic description for crawlers */ }
118+ < div class = "annotation-description" aria-label = "About these annotations" >
119+ < p >
120+ This page contains { sortedAnnotations . length } annotations and commentary on the source document.
121+ Each annotation includes the original text context, personal insights, and relevant connections.
122+ </ p >
123+ </ div >
124+
116125 < div class = "annotation-source-citation" >
117126 Source document retrieved from{ " " }
118127 < a href = { pdfUrl } target = "_blank" rel = "noopener noreferrer" >
@@ -121,15 +130,16 @@ export default (() => {
121130 </ div >
122131
123132 < div class = "annotation-split-view" >
124- < div class = "annotation-pdf-container" >
133+ < div class = "annotation-pdf-container" aria-label = "Source document viewer" >
125134 < div id = "pdf-viewer" class = "pdf-canvas-wrapper" >
126135 { /* PDF.js will be injected here via client-side script */ }
127- < div class = "pdf-loading" > Loading PDF...</ div >
136+ < div class = "pdf-loading" aria-hidden = "true" > Loading PDF...</ div >
128137 </ div >
129138 </ div >
130139
131140 < div class = "annotation-sidebar" >
132- < div class = "annotation-list" >
141+ < article class = "annotation-list" role = "main" aria-label = "Annotations" >
142+ < h2 class = "annotation-list-heading" > Annotations</ h2 >
133143 { sortedAnnotations . map ( annotation => {
134144 const textQuote = annotation . target ?. [ 0 ] ?. selector ?. find (
135145 s => s . type === "TextQuoteSelector"
@@ -139,14 +149,16 @@ export default (() => {
139149 )
140150
141151 return (
142- < div
152+ < article
143153 class = "annotation-item"
144154 data-annotation-id = { annotation . id }
145155 data-start = { textPosition ?. start }
146156 data-end = { textPosition ?. end }
157+ itemScope
158+ itemType = "https://schema.org/Comment"
147159 >
148160 { annotation . text && (
149- < div class = "annotation-comment" >
161+ < div class = "annotation-comment" itemProp = "text" >
150162 < div dangerouslySetInnerHTML = { { __html : annotation . text } } />
151163 </ div >
152164 ) }
@@ -160,14 +172,14 @@ export default (() => {
160172 ) }
161173
162174 < div class = "annotation-meta" >
163- < time datetime = { annotation . created } >
175+ < time datetime = { annotation . created } itemProp = "dateCreated" >
164176 { new Date ( annotation . created ) . toLocaleDateString ( ) }
165177 </ time >
166178 </ div >
167- </ div >
179+ </ article >
168180 )
169181 } ) }
170- </ div >
182+ </ article >
171183 </ div >
172184 </ div >
173185 </ div >
0 commit comments