-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix acessibilidade #140
Merged
Merged
Fix acessibilidade #140
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fed1e9c
elemento <a> com ausência de texto descritivo.
idgserpro ada8daf
descrição das alterações no arquivo CHANGES.rst
idgserpro df63681
Correções apontadas na revisão de código
idgserpro a079921
Code review PR #140.
idgserpro c252dd2
Code review
hvelarde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# -*- coding: utf-8 -*- | ||
from brasil.gov.temas.testing import FUNCTIONAL_TESTING | ||
from plone.app.theming.interfaces import IThemeSettings | ||
from plone.app.theming.utils import applyTheme | ||
from plone.app.theming.utils import getTheme | ||
from plone.registry.interfaces import IRegistry | ||
from plone.testing.z2 import Browser | ||
from zope.component import getUtility | ||
|
||
import Globals | ||
import transaction | ||
import unittest | ||
|
||
|
||
class LinksAcessibilidadeTestCase(unittest.TestCase): | ||
|
||
layer = FUNCTIONAL_TESTING | ||
|
||
def setUp(self): | ||
Globals.DevelopmentMode = True | ||
self.portal = self.layer['portal'] | ||
self.settings = getUtility(IRegistry).forInterface(IThemeSettings) | ||
self.browser = Browser(self.layer['app']) | ||
transaction.commit() | ||
|
||
def base_test(self, cor): | ||
"""Teste base dos temas.""" | ||
theme = getTheme(cor) | ||
applyTheme(theme) | ||
self.settings.enabled = True | ||
transaction.commit() | ||
|
||
self.browser.open(self.portal.absolute_url()) | ||
|
||
# Testa se a âncora para o conteúdo aparece. | ||
self.assertIn( | ||
'<a name="acontent" id="acontent" class="anchor">', | ||
self.browser.contents, | ||
) | ||
|
||
# Testa se a âncora para o menu aparece. | ||
self.assertIn( | ||
'<a name="anavigation" id="anavigation" class="anchor">', | ||
self.browser.contents, | ||
) | ||
|
||
# Testa se o input para a busca aparece. | ||
self.assertIn( | ||
'name="SearchableText"', | ||
self.browser.contents, | ||
) | ||
|
||
# Testa se a âncora para o rodapé aparece. | ||
self.assertIn( | ||
'<a name="afooter" id="afooter" class="anchor">', | ||
self.browser.contents, | ||
) | ||
|
||
def test_link_para_conteudo_tema_amarelo(self): | ||
self.base_test('amarelo') | ||
|
||
def test_link_para_conteudo_tema_azul(self): | ||
self.base_test('azul') | ||
|
||
def test_link_para_conteudo_tema_branco(self): | ||
self.base_test('branco') | ||
|
||
def test_link_para_conteudo_tema_verde(self): | ||
self.base_test('verde') |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the use of the
name
attribute is deprecated in HTML5:https://www.w3.org/TR/html5/obsolete.html#obsolete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't add this attribute, it was already available in the code. Since removing this is out of the scope of this PR, we're opening a new ticket do address it #141 in another branch.