Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Add a few ARIA roles
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBarnett committed Oct 17, 2014
1 parent 27bc327 commit 9924a13
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions go/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,19 @@ def test_help_not_authenticated(self):
class TestApp(GoDjangoTestCase):
def setUp(self):
self.vumi_helper = self.add_helper(DjangoVumiApiHelper())
self.user_helper = self.vumi_helper.make_django_user()
self.client = self.vumi_helper.get_client()

def test_google_analytics(self):
client = self.vumi_helper.get_client('superuser@example.com')
response = client.get(reverse('home'), follow=True)
response = self.client.get(reverse('home'), follow=True)
self.assertContains(response, 'TEST-GA-UA')
self.assertContains(response, 'analytics.js')

# TODO: test ARIA role presence
# role="contentinfo" on every page
# role="banner", role="navigation" on every app page
# role="search" on every search form
def test_aria_footer(self):
response = self.client.get(reverse('home'), follow=True)
self.assertContains(response, 'role="contentinfo"')

def test_aria_banner_and_nav(self):
response = self.client.get(reverse('home'), follow=True)
self.assertContains(response, 'role="banner"')
self.assertContains(response, 'role="navigation"')

0 comments on commit 9924a13

Please sign in to comment.