An ab initio itinerant-electron calculation for a class of cerium and uranium compounds was performed over the full frequency range studied experimentally. The band structure is obtained from a self-consistent spin-polarized full-potential linearized muffin-tin orbital calculation with a true interstitial. It was found that, for the compounds that display giant Kerr rotations, such a conventional calculation provides magnetooptic behavior very different from that obtained experimentally. This poor agreement was attributed to the presence of a large orbitally driven magnetism totally unlike the magnetism of Ni and Fe, and to the possible importance of explicit correlation effects on approaching heavy fermion behavior. Therefore, explicit orbital polarization was incorporated into the band calculation. This brings about a much better agreement for the ordered magnetic moments but fails to provide adequate agreement for the magnetooptic behavior; furthermore, unlike a calculation including explicit correlation effects, it does not provide agreement with the experimental ordered moment for the incipient heavy fermion CeTe system.