You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is definitely a useful library, but I would hope for improved HTML semantics.
Table caption
When rendering the table to display the diff, it would be beneficial to support or auto-generate a caption value. In practice this would probably be something like "Changes for [filename]". This way, those navigating with assistive technologies, accessibility trees or landmarks navigation can have greater context as to what the information is.
Deletions use <del> tag
When showing document changes like this diff viewer, and showing deletions, it's more appropriate to use the <del> element. This creates a more accurate semantic experience and doesn't rely entirely on the visual UI to understand what content is being deleted.
Insertions use <ins> tag
Much like the previous <del> tag, when displaying insertions, the <ins> tag should be used. Again, this provides greater context to those who may browse with assistive technologies and /or accessibility trees. Using these semantic tags will ensure that the markup communicates as clearly as the UI design.
# [4.0.0](v3.3.0...v4.0.0) (2023-10-19)
### Bug Fixes
* do not trim trailing newlines (fixes [#27](#27)) ([ee4d53f](ee4d53f))
* use semantic elements for diff elements (fixes [#23](#23)) ([a6222c7](a6222c7))
* feat!: diff/flexbox based layout, text selectable per side (fixes#15) ([9f6c4d5](9f6c4d5)), closes [#15](#15)
### Features
* add summary element and fold expansion/folding (fixes [#22](#22), [#21](#21)) ([e47cbe1](e47cbe1))
### BREAKING CHANGES
* This completely modifies the way react-diff-viewer-continued is rendered. The overall
layout should be more or less the same, but with the new layout probably come new bugs.
This is definitely a useful library, but I would hope for improved HTML semantics.
Table
caption
When rendering the
table
to display the diff, it would be beneficial to support or auto-generate acaption
value. In practice this would probably be something like "Changes for [filename]". This way, those navigating with assistive technologies, accessibility trees or landmarks navigation can have greater context as to what the information is.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
Deletions use
<del>
tagWhen showing document changes like this diff viewer, and showing deletions, it's more appropriate to use the
<del>
element. This creates a more accurate semantic experience and doesn't rely entirely on the visual UI to understand what content is being deleted.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
Insertions use
<ins>
tagMuch like the previous
<del>
tag, when displaying insertions, the<ins>
tag should be used. Again, this provides greater context to those who may browse with assistive technologies and /or accessibility trees. Using these semantic tags will ensure that the markup communicates as clearly as the UI design.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
The text was updated successfully, but these errors were encountered: