-
Notifications
You must be signed in to change notification settings - Fork 385
VUFIND-1673 Set unique labels for checkboxes #3552
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
base: dev
Are you sure you want to change the base?
Changes from 2 commits
5a2d79b
0ea1a8b
2d5c7da
71ae34f
ecc4c52
2e48d0a
6203cb0
1846426
75a862d
e5db19d
df57607
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| <label class="record-checkbox hidden-print"> | ||
| <input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<?php if (isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?> aria-label="<?=$this->transEscAttr('select_item')?>"> | ||
| <?php $title = $this->titleHtml ?? $this->escapeHtmlAttr($driver?->getTitle() ?? $this->id); ?> | ||
| <input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<?php if (isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?> aria-label="<?=$title ?>"> | ||
|
||
| <span class="checkbox-icon"></span> | ||
| <?php if (strlen($this->number ?? '') > 0): ?><span class="sr-only"><?=$this->transEsc('result_checkbox_label', ['%%number%%' => $this->number]) ?></span><?php endif; ?> | ||
| </label> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a clean way here to get the record driver, to pass to the Record view helper for
getUniqueHtmlElementId. I could use$ilsDetails['item_id']which in my testing is the same value, but I believe there are cases where that might not be. Alternately maybe I can use$safeIdand generate the same value in account-entry.phtml, but I don't know if that adds any value.If there is not a way to get
getUniqueHtmlElementIdhere, then I should revert the changes to account-entry since they don't have any purpose.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And once we figure out this screen, I can apply the logic to the other account pages with checkboxes.
#3552 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this template, I believe that
$resourceis the record driver. Does that help?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks! Got this page working with aria-labelledby as well now. Not to presuppose the final decision, but at least the approach is consistent now in this PR for the pages that the Moravian report originally cited.