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
When using a Foundation Accordion with data-deep-link, the page should scroll to the top of the data-accordion-item, not the top of the data-tab-content. Further, there should be a means of allowing this to include an offset in order to account for e.g. a sticky header.
What is wrong now?
Currently, when data-deep-link is enabled, the URL fragment points to the id of the data-tab-content. When a user navigates to a URL with that fragment, the browser scrolls to that data-tab-content and opens it. In doing so, however, the title is hidden above the view port. Further, if there's a sticky header, then the content itself will also be hidden under this area.
To help provide context, this is the markup for the Accordion:
There are currently two attributes—data-deep-link-smudge and data-deep-link-smudge-offset—which provide similar types of control. They scroll to the top of the data-accordion, however, not to the top of the data-tab-content. One could imagine a similar set of attributes for controlling the scroll position of deep links to the top of the data-accordion-item.
Note: It's not entirely clear to me what the utility of data-deep-link-smudge is, as it can result in the open tab not even being visible in cases where the height of the accordion panel is higher than the viewport. Personally, I'd have expected data-deep-link-smudge to operate as I've proposed here, but that doesn't appear to be the design intent.
Your Environment
Foundation version(s) used: 6.6.3
Browser(s) name and version(s): Google Chrome 86.0.4240.198
Device, Operating System and version: Windows 10 Pro 20H2
Checklist
I have read and follow the CONTRIBUTING.md document.
There are no other issues similar to this one*.
The issue title and template are correctly filled.
There was a somewhat similar issue in 2013 related to clicking on the title/label. My request, however, relates to the opening a URL with a data-deep-link fragment.
The text was updated successfully, but these errors were encountered:
The `data-deep-link-smudge` behavior previously enabled (151c237) does not operate as expected. It ensures that the top of the accordion _panel_ is visible, not the top of the current accordion _item_. That's not what we want, as it can result in the current item being pushed offscreen entirely when working with lengthy accordions.
Given this, I've returned to the default behavior, which results in the title being hidden behind the sticky navigation. This isn't optimal, but it at least ensures that the current item remains visible.
In addition, I've submitted a feature request to Zurb (foundation/foundation-sites#12176) so that, hopefully, we might see the desired behavior in a future release of Foundation Sites.
What is missing?
When using a Foundation Accordion with
data-deep-link
, the page should scroll to the top of thedata-accordion-item
, not the top of thedata-tab-content
. Further, there should be a means of allowing this to include an offset in order to account for e.g. a sticky header.What is wrong now?
Currently, when
data-deep-link
is enabled, the URL fragment points to theid
of thedata-tab-content
. When a user navigates to a URL with that fragment, the browser scrolls to thatdata-tab-content
and opens it. In doing so, however, the title is hidden above the view port. Further, if there's a sticky header, then the content itself will also be hidden under this area.To help provide context, this is the markup for the Accordion:
Possible Solution
There are currently two attributes—
data-deep-link-smudge
anddata-deep-link-smudge-offset
—which provide similar types of control. They scroll to the top of thedata-accordion
, however, not to the top of thedata-tab-content
. One could imagine a similar set of attributes for controlling the scroll position of deep links to the top of thedata-accordion-item
.Your Environment
Checklist
data-deep-link
fragment.The text was updated successfully, but these errors were encountered: