You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add accessible iframe titles and document language - #250
There’s an upgrade case for the two new attributes. I saved an IFrame and a Figure with Branca 0.8.2, then loaded them in a separate process on 2145813. Both unpickle successfully. Rendering the old IFrame raises AttributeError: 'IFrame' object has no attribute 'title' (with either a fixed height or the default responsive layout). The old Figure renders <html lang="">, whereas a newly constructed figure gets lang="en".
Element.__setstate__ restores the saved attributes without running the constructor. I tried class-level defaults of IFrame.title = None and Figure.lang = "en" alongside the existing constructor assignments: both old iframe layouts rendered and the old figure picked up en. Could we cover missing attributes from an older saved object in the accessibility tests?
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Figuretitle as the accessible name of its notebook iframetitleargument toIFramelangattribute to generated Figure documents, defaulting toenThis lets Folium users write
map.get_root().title = "Map description"and get both a document title and an accessible iframe name.Closes #213.
Tests
pytest tests/test_accessibility.py(2 passed)test_color_brewer_extendabilitytest (34 passed)flake8black --checkisort --check-onlycodespellmypy branca