Skip to content

Commit

Permalink
Merge pull request #849 from equalizedigital/steve/8065492104/find-un…
Browse files Browse the repository at this point in the history
…ique-missing-transcripts

updated: EDAC_Dom and missing_transcript to modify element output to ensure each unique element is stored
  • Loading branch information
SteveJonesDev authored Feb 5, 2025
2 parents 59342be + a6dc86f commit 97fe88e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/classes/class-edac-dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function convert_tag_to_marker( $tags ) {
}

foreach ( $elements as $element ) {
$element->innertext = '[' . $element->tag_start . '_ac_element]';
$element->outertext .= ' element:' . $element->tag_start;
}
}

Expand Down
3 changes: 1 addition & 2 deletions includes/rules/missing_transcript.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ function edac_rule_missing_transcript( $content, $post ) { // phpcs:ignore -- $c
$dom->convert_tag_to_marker( [ 'img', 'iframe', 'audio', 'video', '.is-type-video' ] );
foreach ( $elements as $element ) {
if ( ! $dom->text_around_element_contains( $element, __( 'transcript', 'accessibility-checker' ), 25 ) ) {
$element->innertext = '';
$errors[] = $element;
$errors[] = $element;
}
}
$linked_media = $dom->find_linked_media( true );
Expand Down

0 comments on commit 97fe88e

Please sign in to comment.