Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: aria-labelledby attribute handling to prevent double double quotes from outputting #1088 #1089

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions templates/popup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
* @copyright Copyright (c) 2024, Code Atlantic LLC
*/

$labelledby = pum_get_popup_title() !== '' ? 'aria-labelledby="pum_popup_title_' . pum_get_popup_id() . '"' : '';
$labelledby = pum_get_popup_title() !== '' ? 'pum_popup_title_' . pum_get_popup_id() : '';

?>
<div id="pum-<?php pum_popup_ID(); ?>" role="dialog" aria-modal="false" <?php echo esc_attr( $labelledby ); ?> class="<?php pum_popup_classes(); ?>" <?php pum_popup_data_attr(); ?>>
<div id="pum-<?php pum_popup_ID(); ?>" role="dialog" aria-modal="false"
<?php if ( $labelledby ) : ?>aria-labelledby="<?php echo esc_attr( $labelledby ); ?>"<?php endif; ?>
class="<?php pum_popup_classes(); ?>" <?php pum_popup_data_attr(); ?>>

<div id="popmake-<?php pum_popup_ID(); ?>" class="<?php pum_popup_classes( null, 'container' ); ?>">

Expand Down