|
132 | 132 | {/if} |
133 | 133 | {:else if token.type === 'table'} |
134 | 134 | <div class="relative w-full group mb-2"> |
135 | | - <div class="scrollbar-hidden relative overflow-x-auto max-w-full"> |
| 135 | + <div class="scrollbar-hidden relative overflow-x-auto max-w-full" dir="auto"> |
| 136 | + <span class="sr-only" aria-hidden="true">{token.header[0]?.text || ''}</span> |
136 | 137 | <table |
137 | | - class=" w-full text-sm text-left text-gray-500 dark:text-gray-400 max-w-full rounded-xl" |
138 | | - dir="auto" |
| 138 | + class=" w-full text-sm text-start text-gray-500 dark:text-gray-400 max-w-full rounded-xl" |
139 | 139 | > |
140 | 140 | <thead |
141 | 141 | class="text-xs text-gray-700 uppercase bg-white dark:bg-gray-900 dark:text-gray-400 border-none" |
142 | 142 | > |
143 | 143 | <tr class=""> |
144 | 144 | {#each token.header as header, headerIdx} |
145 | | - <th |
146 | | - scope="col" |
147 | | - class="px-2.5! py-2! cursor-pointer border-b border-gray-100! dark:border-gray-800!" |
148 | | - style={token.align[headerIdx] ? '' : `text-align: ${token.align[headerIdx]}`} |
149 | | - > |
150 | | - <div class="gap-1.5 text-left"> |
| 145 | + <th |
| 146 | + scope="col" |
| 147 | + class="px-2.5! py-2! cursor-pointer border-b border-gray-100! dark:border-gray-800!" |
| 148 | + style={token.align[headerIdx] ? '' : `text-align: ${token.align[headerIdx]}`} |
| 149 | + dir="auto" |
| 150 | + > |
| 151 | + <div class="gap-1.5 text-start"> |
151 | 152 | <div class="shrink-0 break-normal"> |
152 | 153 | <MarkdownInlineTokens |
153 | 154 | id={`${id}-${tokenIdx}-header-${headerIdx}`} |
|
166 | 167 | {#each token.rows as row, rowIdx} |
167 | 168 | <tr class="bg-white dark:bg-gray-900 text-xs"> |
168 | 169 | {#each row ?? [] as cell, cellIdx} |
169 | | - <td |
170 | | - class="px-3! py-2! text-gray-900 dark:text-white w-max {token.rows.length - |
171 | | - 1 === |
172 | | - rowIdx |
173 | | - ? '' |
174 | | - : 'border-b border-gray-50! dark:border-gray-850!'}" |
175 | | - style={token.align[cellIdx] ? `text-align: ${token.align[cellIdx]}` : ''} |
176 | | - > |
177 | | - <div class="break-normal"> |
| 170 | + <td |
| 171 | + class="px-3! py-2! text-gray-900 dark:text-white w-max {token.rows.length - |
| 172 | + 1 === |
| 173 | + rowIdx |
| 174 | + ? '' |
| 175 | + : 'border-b border-gray-50! dark:border-gray-850!'}" |
| 176 | + style={token.align[cellIdx] ? `text-align: ${token.align[cellIdx]}` : ''} |
| 177 | + dir="auto" |
| 178 | + > |
| 179 | + <div class="break-normal text-start"> |
178 | 180 | <MarkdownInlineTokens |
179 | 181 | id={`${id}-${tokenIdx}-row-${rowIdx}-${cellIdx}`} |
180 | 182 | tokens={cell.tokens} |
|
0 commit comments