Repository navigation
Finna 4288 fix content skip link position 2 #3548
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 4 commits
ff8030c
150d1d1
ced448b
b50b1fe
277af92
869ebdb
dada18f
cc3646d
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 |
|---|---|---|
|
|
@@ -10,6 +10,10 @@ | |
| $thumbnail = false; | ||
| $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); | ||
| $formats = $this->driver->getFormats(); | ||
|
|
||
| // Add Finna skip link target | ||
| $this->layout()->finnaSkipLinkTarget = $finnaSkipLinkTarget = 'record-skip-link-target'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ja täällä edelleen tuo |
||
|
|
||
| ob_start(); ?> | ||
| <div class="media-<?=$thumbnailAlignment?>"> | ||
| <?= $this->record($this->driver)->renderTemplate('record-image-information.phtml', ['img' => $img, 'imageClick' => 'none']) ?> | ||
|
|
@@ -25,12 +29,12 @@ | |
| <?php $thumbnail = ob_get_contents(); ?> | ||
| <?php ob_end_clean(); ?> | ||
| <div class="media"> | ||
| <h1 class="record-title visible-xs"><?=$this->escapeHtml($this->driver->getTitle())?></h1> | ||
| <h1 class="record-title visible-xs" aria-hidden="true"><?=$this->escapeHtml($this->driver->getTitle())?></h1> | ||
| <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> | ||
| <?=$thumbnail ?> | ||
| <?php endif; ?> | ||
| <div class="media-body record-information"> | ||
| <h1 class="record-title hidden-xs"><?=$this->escapeHtml($this->driver->getTitle())?></h1> | ||
| <?=$this->partial('layout/skiplink-core-heading.phtml') ?> | ||
| <?php if ($results = $this->driver->getAlternativeTitles()): ?> | ||
| <div class="recordAltTitles record-alt-titles"> | ||
| <?=implode('<br>', array_map([$this, 'escapeHtml'], $results))?> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,6 +161,10 @@ | |
| $contentElementId = 'main'; | ||
| if (!empty($this->layout()->finnaUserAccountHeading)) { | ||
| $contentElementId = 'useraccount-content-heading'; | ||
| } elseif ($isLandingPage) { | ||
| $contentElementId = 'main'; | ||
| } elseif ((!empty($this->layout()->finnaSkipLinkTarget))) { | ||
| $contentElementId = 'record-skip-link-target'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Miksi tämä on edelleen kovakoodattuna, kun piti käyttää tuota finnaSkipLinkTarget:n arvoa? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tämä edelleen.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ilman tuota kovakoodattua tietoa ei mikään sivu, esim. - |
||
| } elseif (!empty($this->layout()->finnaMainHeader)) { | ||
| $contentElementId = 'content-heading'; | ||
| } elseif (!empty($this->layout()->finnaMainTabs)) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <!-- START of: finna - layout/skiplink-core-heading.phtml --> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tämä ei kuulu layout:iin. Laita ennemmin RecordDriver/DefaultRecord/record-title-skiplink.phtml tms. |
||
| <div role="heading" aria-level="1" id="record-skip-link-target" class="visually-hidden" aria-label="<?=$this->escapeHtml($this->driver->getTitle())?>"></div> | ||
| <h1 class="record-title hidden-xs" aria-hidden="true"><?=$this->escapeHtml($this->driver->getTitle())?></h1> | ||
| <!-- END of: finna - layout/skiplink-core-heading.phtml --> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,9 @@ | |
| $searchType = $this->params->getSearchType(); | ||
| $geoFilter = ''; | ||
|
|
||
| // Add Finna skip link target | ||
| $this->layout()->finnaSkipLinkTarget = $finnaSkipLinkTarget = 'record-skip-link-target'; | ||
|
|
||
| // Store search id: | ||
| $this->layout()->searchId = $this->results->getSearchId(); | ||
|
|
||
|
|
@@ -110,7 +113,8 @@ | |
| $recommendations = $this->results->getRecommendations('side'); | ||
| ?> | ||
|
|
||
| <h1 tabindex="-1" id="results-heading" class="visually-hidden"><?= $this->transEsc('Search Results'); ?></h1> | ||
| <h1 tabindex="-1" id="results-heading" class="visually-hidden" aria-hidden="true"><?= $this->transEsc('Search Results'); ?></h1> | ||
| <div id="<?=$finnaSkipLinkTarget ?>" role="heading" aria-level="1" class="visually-hidden" ><?= $this->transEsc('Search Results'); ?></div> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sama juttu kuin ylempänä, muuten ei päädytä sisältöön vaan - searchTabs - osioon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Edelleen, |
||
| <?php if ($recordTotal > 0): ?> | ||
| <div class="mobile-nav-toggle-trigger visible-xs hidden-print"></div> | ||
| <div class="mobile-nav-toggle visible-xs hidden-print"> | ||
|
|
||
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.
Mikä tuon
$finnaSkipLinkTarget-muuttujan tarkoitus on?Uh oh!
There was an error while loading. Please reload this page.
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.
Tuo on pakollinen, sillä muuten skiplinkki menee - finnaMainTabs - kohtaan joka ei siis ole suoraan sisältöä.
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.
Ei ole. Se on paikallinen muuttuja, jolla ei ole mitään virkaa.
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.
Tämä edelleen.