angular-phonecat icon indicating copy to clipboard operation
angular-phonecat copied to clipboard

step-15 Accessibility

Open felixzapata opened this issue 9 years ago • 22 comments

  • Add ngAria module.
  • Add labels to the search and order fields.
  • Add accessibility plugin for Protractor.
    • Add missing alt attributes in the phone detail.
  • Add aria live regions to inform the user about results after searching and filtering elements.
  • Improve access via keyboard:
  • Navigate between the images in a phone detail.
  • Add headings elements.
  • Add information about checkmarks in the phone detail specs.

By the way, do I have to modify the document in the full tutorial?

felixzapata avatar May 28 '16 18:05 felixzapata

hi @gkalpak, ¿is there any way that the use of the debounce option for the ng-model works with Protractor? I need this option for my changes. But with that, the e2e tests fail.

I know that there is an issue about that but nothing more.

felixzapata avatar May 30 '16 07:05 felixzapata

Without having really looked into that, I can't imagine how protractor can be ignoring the debounce. It's something that Angular does and PRotractor doesn't have a way to "ignore" it.

What is probably happening, is that Protractor waits for the view to "stabilize" (which in Angular terms includes waiting for registered timeouts, such as the one used by debounce) and only then assets your expectation.

If you want to circumvent that, you can turn on ignoreSynchronization (read more about it here).

If you can't get it to work, post the failing test and I'll take a look.

gkalpak avatar May 30 '16 12:05 gkalpak

I think that with ignoreSynchronization does not work. I saw yesterday this information about timeouts. One of the test that fails is:

    it('should filter the phone list as a user types into the search box', function() {
      var phoneList = element.all(by.repeater('phone in $ctrl.phones'));
      var query = element(by.model('$ctrl.query'));

      expect(phoneList.count()).toBe(20);

      query.sendKeys('nexus');
      expect(phoneList.count()).toBe(1);

      query.clear();
      query.sendKeys('motorola');
      expect(phoneList.count()).toBe(8);
    });

The problem is the expect runs before the debounce finishes, so the results never will be the correct. It Is the same example that an user reported in the Protractor issue that I mentioned before.

I have tried using wait and setTimeout but I obtain the same errors.

felixzapata avatar May 30 '16 12:05 felixzapata

@gkalpak After a review, I think that my problem is related with some changes I've made in the repeater. I will check it.

felixzapata avatar May 31 '16 07:05 felixzapata

@gkalpak done. Now the e2e tests pass in my local environment. I've added an browser.sleep suggested by @mohitjee15 and I've changed how to obtain the repeater in the scenario due to my changes in the template.

But here, Travis throws an error WebDriverError: unknown error: Chrome version must be >= 46.0.2490.0

felixzapata avatar May 31 '16 07:05 felixzapata

Thx :+1: I will take a look this week !

gkalpak avatar May 31 '16 08:05 gkalpak

ok @gkalpak. Do I have to modify the full tutorial and send another pull request or I have to wait until this pull request is accepted?

felixzapata avatar May 31 '16 09:05 felixzapata

Yes, you have to update the tutorial context as well, so we can merge them together.

gkalpak avatar May 31 '16 09:05 gkalpak

ok, I will work in the tutorial and I will send another pulll request as soon as possible.

felixzapata avatar May 31 '16 09:05 felixzapata

@felixzapata, I'll review this together with the tutorial content PR - feel free to ping me when it's ready. Thx for working on this :+1:

gkalpak avatar Jun 03 '16 18:06 gkalpak

@gkalpak I've created the pull request with the new step in the tutorial.

About this pull request, please feel free to comment if I need to review the code in the new directives due to some mistakes.

felixzapata avatar Jun 15 '16 09:06 felixzapata

Awesome! I will take a look soon.

gkalpak avatar Jun 15 '16 09:06 gkalpak

Note to self: We need a new tag for this step.

gkalpak avatar Jun 20 '16 14:06 gkalpak

Why had the previous steps be modified? Since this is an extra step at the end, previous steps should not be touched as far as I understand. Do I miss something?

gkalpak avatar Jun 20 '16 14:06 gkalpak

@gkalpak I will check again the pull request. I'm only want to upload three commits and I though that it was ok.

felixzapata avatar Jun 20 '16 14:06 felixzapata

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

googlebot avatar Jun 20 '16 14:06 googlebot

CLAs look good, thanks!

googlebot avatar Jun 20 '16 14:06 googlebot

@gkalpak done, a problem with the rebase

felixzapata avatar Jun 20 '16 14:06 felixzapata

@gkalpak I´ve updated the PR to avoid the multiple commits.

I will take a look to your comments.

felixzapata avatar Dec 13 '16 14:12 felixzapata

@gkalpak I will update the PR with only one single commit.

felixzapata avatar Dec 13 '16 15:12 felixzapata

@gkalpak is there a problem inside Travis with the driver for Chrome?

felixzapata avatar Dec 14 '16 07:12 felixzapata

Not sure, but if the tests pass locally, don't worry about Travis. I'll deal with it later.

gkalpak avatar Dec 14 '16 08:12 gkalpak