-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
list based slider #212
Comments
You can do this already, you just need to use the 'slide' config option:
|
Ok that works but it kind of destroys the semantics of the markup. The generated output is now:
|
Those div elements get wrapped around your stuff after the page loads, via JavaScript , so anything that measured semantic value would never see it. |
@kenwheeler I doubt, that "anything that measures semantic value" never sees the generated dom:
IMO there should be a way to stay semantically correct when using slick on lists (which are probably most slideshows). |
Crawlers do not execute javascript, they have an escapedFragment callback that allows developers to serve a rendered page independently of the original source |
@kenwheeler thx for your reply. I still think, however, that (at least Google) does nowadays execute JavaScript when crawling:
Source: http://googlewebmastercentral.blogspot.co.at/2014/05/understanding-web-pages-better.html |
@kenwheeler fyi Cheers |
I also believe this should be adressed, I think a semantically correct output regardless of wether crawlers do not parse the JS would be great (wich they do for quite a while already). Another use case: people with screen readers. |
Wouldn't a simple config flag do the trick? All we need to be able to do is set the |
I arrived here looking for this solution as well. I agree with qikkeronline -- would be great to be able to set the slick-track element as a |
so, any chance to see this issue reopend with an updated pov from today?? :) |
@schnubb I personally do think that this should be reopened and addressed. Personally i've moved on to using other solutions which keep original HTML structure and with options provide aria support too. |
Adding my name to the list of people who'd love to see this addressed. Slick is great but, for me, this is the only flaw. |
+1 |
Ok gang, sold. |
@simeydotme @leggomuhgreggo thoughts? should we let any tag be specified and then just hit it with a couple of styles that undo any tag based style defaults that could disrupt things? Or just switch to uls? or make it an enum? |
I don't know man... if you allow footnote: anyone talking about semantics should take a long think about having a carousel on their site. usability, readability and accessibility should be higher up your concerns than semantics of lists 😆 |
lol |
Adding this feature will only improve accessibility IMHO. An I agree, usability, readability and accessibility are valid concerns. But that's what we're trying to improve here right? I believe carousels have become a valid UX pattern and users by now know how to use them, so we can't simply say "serious developers shouldn't use a carousel" anymore. To me there are 2 valid choices here:
|
Thank you for reopen this issue. |
Here's my two cents (glad to see this reopened). This shouldn't introduce any breaking changes to existing sliders. I think it's important to accept a callback function for this in the event that sliders cannot be identified otherwise (think CMS widgets). The Source<div class="slider">
<ul class="slider__list">
<li class="slider__slide">
<img src="/image.jpg" alt="">
</li>
</ul>
</div>
<script>
$('.slider').slick({
track: function() { return $(this).children('slider__list'); }
// etc
});
</script> The Result<div class="slider slick-initialized slick-slider">
<div aria-live="polite" class="slick-list draggable">
<ul class="slider__list slick-track" style="opacity: 1;" role="listbox">
<li class="slider__slide slick-slide slick-cloned slick-active" role="option">
<img src="/image.jpg" alt="">
</li>
</ul>
</div>
</div> Option accepts: selector, element, jquery element, callback
|
@johnrom definitely think that's the best approach. I can't say this is at the top of our list of priorities and I'm wary of expanding the API, but if you whipped up a PR I think it could work. Thanks! |
@johnrom solution doesn't worked for me. |
@saxsax1995 my comment above is a suggestion for how the API for this could look. I have a PR that implements this, but it was never merged in. |
Has there been any progress on this and getting the PR merged in? |
5 years and ongoing, is this supported now and any progress made? Thanks for the hard work though. |
I haven't heard anything and I've migrated to using component based sliders like the creator of this project's own https://github.com/FormidableLabs/nuka-carousel Honestly, I think this project will need to be deprecated as the majority of major organizations (who support development) will have moved on to component-based Angular, React, Vue by now. Just my opinion and may not be shared by the author. |
This should be solved by now :/ |
From the time i've spent so far with the plugin I think its great and very flexible. I have however run into an issue which, whether this is or not.
It doesn't seem that one can create a slider based upon an unordered list:
Is there a reason for this? Would be nice if markup didn't matter.
The text was updated successfully, but these errors were encountered: