Skip to content
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

In List and List's inherited tiles, we should check if an object is a container and get info from it's image #854

Open
idgserpro opened this issue Apr 10, 2019 · 1 comment

Comments

@idgserpro
Copy link
Member

idgserpro commented Apr 10, 2019

For example: in carousel tile, which inherits ListTile, we have a get_alt method:

return obj.Description() or obj.Title()

The problem with this approach is that if you're using for example a collective.nitf.content which is a container and can have an image, you don't get information about the image itself: this way we don't have an alt attribute and an acessibility problem:

WAVE Error

A similar behavior happens in collection tiles (https://github.com/collective/collective.cover/blob/1.8b2/src/collective/cover/tiles/collection.py#L222).

Since both List and Collection inherit from PersistentCoverTile, I suggest moving get_alt to PersistentCoverTile, and have a different approach. Something in the lines of:

https://github.com/plonegovbr/brasil.gov.tiles/blob/1.x/src/brasil/gov/tiles/tiles/collection.py#L202

The comments are in Portuguese, but the code is self explanatory.

@hvelarde
Copy link
Member

hvelarde commented May 2, 2019

IMO this is related to #778.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants