Re: [w3c/webcomponents] Is or how can Shadow DOM be 'SEO friendly'? (#500)

I  am concerned that components will be designed with slots that have entire chunks of SEO content which would make the component effectively a styling & layout container. One use case I could think of would be a page header with a main navigation. You may want the attributes and innerHTML of the anchors to change. The 'skip nav' may change..you may have other dynamic content...etc.

This is easy to do with adding by feeding the data via attributes but it gets cumbersome and very XML-ish. Sending the data via a giant JSON blog is not good for SEO or general best practices in Web Components. Dozens of slots has the same effect as adding attributes.

The obvious 'elephant in the room' is why even use web components in this case? Here's my reasoning...if I have several applications for my customers and I want consistent UX/UI across those apps I want to share large pieces like footers and headers and have customization as per app. I think the answer is this is better suited for a JS framework component UNLESS Shadow DOM is parsed by search engines after the component is flattened. 

@hayatoito - I can see your points as to good design and I agree.It is a important discussion IMO 

>
- If components are well designed, crawlers do not need a flattened tree to get text contents.
- Good search-engine friendly components would enable component users to specify text contents at the place of component's children, as crawl-able text contents, rather than embedding hard-coded text contents in their shadow trees

Ultimately, I guess I created this issue to determine if Shadow DOM needs to expose something to the light DOM for search engines in order to optimize component content discovery (or even web accessibility) before these components are flattened.  How do search engines plan on approaching this? 

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/500#issuecomment-220989407

Received on Monday, 23 May 2016 14:04:58 UTC