Closed smatei closed 4 years ago
I'm in the SEO chapter and will be adding the gathering of img tag info. So far I'm checking alt, loading, width and height attributes. My plan is to place all the info in an 'image' property for the response. It could be worth combining this image based effort?
aria-label
and aria-labelledby
attributes might also be interesting as alternatives to alt
attributes.
I'm in the SEO chapter and will be adding the gathering of img tag info. So far I'm checking alt, loading, width and height attributes. My plan is to place all the info in an 'image' property for the response. It could be worth combining this image based effort?
@Tiggerito Yes, we could group them together under "image". But, I am new here, it is not my call. I will wait for further instructions from the code reviewers.
@Tiggerito Yes, we could group them together under "image". But, I am new here, it is not my call. I will wait for further instructions from the code reviewers.
Don't worry, I'm also learning on the fly. Lets just keep in contact about what we need, and try to pull things together when we can.
You can see my images code here
https://github.com/Tiggerito/legacy.httparchive.org/blob/patch-1/custom_metrics/almanac.js
You used the term image not images for the property. You are probably right.
I have changed both custom metrics to return length, renamed them with num_ and updated tests for all combinations:
"num_picture_img":0,"num_image_sizes":0
"num_picture_img":0,"num_image_sizes":1
I've added a pull request from the SEO team for our image property. I think it may be tricky to consolidate things at this point, and we are on a tight schedule.
Maybe once my code is merged you can consider folding your data into the image property. That way you know if your own property has moved and can adjust your SQL to match. I'd say not urgent, as it's just about neatness.
I've also noticed quite a mix of property naming conventions, and am not sure which one is best. It's always confusing when we are coding in multiple languages that follow different rules. Again, not important with this tight schedule. Most important is that we get the data needed.
We need srcset w/wo sizes for Media.
I have added some metrics:
"num_srcset_all":6,"num_srcset_sizes":0
We need srcset with x/w descriptors custom metrics in Media
Tests:
We need to count the picture tags that use min-resolution in Media
Tests:
I have added a metric for counting pictures with device orientation for Media
Tests:
I could not find a live url for which that metric would return non 0 values, please help.
For 0 value - "num_picture_using_orientation":0
@smatei thanks for your changes. Reassign back to me when it's ready for review. 👍
added one more metric for count srcset candidate list size in img only cases (i.e. that are NOT in picture )
Tests:
@rviscomi, here is another custom metric for the 2020 media chapter.
source/img with sizes attribute expensive sql with regexp
I combined both conditions in the same metric, just as in the original sql. They could also be split metrics. Also we could add an empty attribute condition - img[sizes]:not([sizes=""]). Please advise.
As for the tests:
img sizes
source sizes
no img/source sizes