Open bryanwillis opened 8 years ago
Yeah, I feel like we've been supporting XHTML when we think of it but not making it a priority.
I'm in favor of stripping XHTML from the theme and making it exclusively HTML5.
Awesome!
I've turned this into an actionable item in #155
@bryanwillis As I look at the changes involved, I'm revisiting this question.
I agree that we could change
$nav = genesis_markup( array(
'html5' => '<nav %s><ul class="pager">',
'xhtml' => '<div class="navigation"><ul class="pager">',
'context' => 'archive-pagination',
'echo' => false,
) );
found at https://github.com/salcode/bootstrap-genesis/blob/develop/lib/pagination-prev-next.php#L44-L49
to
sprintf( '<nav %s>', genesis_attr( 'archive-pagination' ) );
which would maintain the same html5 functionality. I'm concerned that what we do lose is the standardizations and the parallels to Genesis core.
I can imagine developers who understand the first code example (using genesis_markup()
) allows them to use a filter on the output but not in the second case.
To this end, I tried to remove the xhtml
value but still use genesis_markup()
however this fails. We could pass in an empty string ( `'xhtml' => '' ) though I don't love this idea.
I like the consistency of using genesis_markup()
when we need an area to filterable even if it means we end up including xhtml
values that don't get used.
With Microsoft stopping support for legacy browsers on the 12th of January and Firefox and Safari having automatic updates, I’m not quite sure it's necessary to support xhtml. On top of that a lot of our code is conflicting with one another.
Here we declaring html5 doctype, but most of the rest of the theme checks for html5.
We either need to check for html5 everywhere or forgo genesis_markup everywhere for genesis_attr
sprintf( '<nav %s>', genesis_attr( 'archive-pagination' ) );
To me it seems like future themes should not have to do checks for xhtml when not even microsoft supports it anymore. As developers we shouldn't be the ones promoting it! That's just my opinion though.
Whether we support it or not we need to be consistent across the board.